Code Monkey home page Code Monkey logo

hangfire-ravendb's People

Contributors

andrewmarkley avatar austinwinstanley avatar derekdhaas avatar krivulcik avatar mjohnson0580 avatar patins1 avatar sigurbjorngudjonsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hangfire-ravendb's Issues

Not working in ASP.Net applications

The latest version doesn't appear to be working in ASP.Net applications.

When making a call to BackgroundJob.Enqueue I am getting the following exception:

System.NullReferenceException
                      Message=Object reference not set to an instance of an object.
                      Source=Hangfire.Raven
                      StackTrace:
                           at Hangfire.Raven.RavenJsonMethodConverter.Read(Type type, Object value, JsonSerializer serializer)
                           at Hangfire.Raven.RavenJsonConverterBase`1.ReadJson(JsonReader reader, Type type, Object existingValue, JsonSerializer serializer)
                           at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) in C:\Builds\RavenDB-Stable-3.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 1771
                           at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) in C:\Builds\RavenDB-Stable-3.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 900
                           at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) in C:\Builds\RavenDB-Stable-3.5\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 2005

I believe this is due to Assembly.GetEntryAssembly() returning null on the following line:
https://github.com/cady-io/hangfire-ravendb/blob/c65b8b13143302424763c2d5d76eeed68a2e225c/src/Hangfire.Raven/RavenJsonConverters.cs#L90

The same error would also occur here:
https://github.com/cady-io/hangfire-ravendb/blob/c65b8b13143302424763c2d5d76eeed68a2e225c/src/Hangfire.Raven/RavenJsonConverters.cs#L107

Not accepting connection strings

I am unable to configure RavenStorage using a predefined connection string e.g. GlobalConfiguration.Configuration.UseRavenStorage("Hangfire"), where the connection string is defined like the following in the web.config:

<connectionStrings>
  <add name="Hangfire" connectionString="Url = http://localhost:8080;Database=Hangfire" />
</connectionStrings>

It appears that DefaultDatabase is being overwritten with null on the following line:
https://github.com/cady-io/hangfire-ravendb/blob/master/src/Hangfire.Raven/Repository.cs#L61

I don't believe the DefaultDatabase (or ApiKey) need to set explicitly here as these values are already defined in the connection string itself.

RavenDB dependency issue on full framework

I am trying to use hangfire.ravendb in a .net 4.6 project that also uses RavenDB. This is not possible due to a version conflict with RavenDB client. I am using the net45 version, while this library is using the netstandard1.3 version.

The netstandard1.3 dependency doesn't resolve due to difference in public key token (netstandard1.3's key is null). I've tried to get around this by manually loading the full version assembly using AppDomain.CurrentDomain.AssemblyResolve event but that didn't work either due to implementation differences between the assembly versions.

Could you provide a full framework version or workaround?

Production API Key configuration

How do I configure the connection string for production use with an API Key, the raven instance is located on another server so I'm using the secure API Key.

GlobalConfiguration.Configuration.UseRavenStorage("connection_string", "database_name");

The connection string contains Url at the start which causing the http/https exception. Of course I dropped the URL part but it comes with the api key and database name already.

Options from Raven are:

Connection String: "Url = http://localhost:8080; ApiKey = esting/cheeolfngotns; Database = Testing"
Direct Link: "http://localhost:8080/studio/index.html#api-key=testing/cheeolfngotns"

I've tried all sorts of variations to get it working but it errors with:

System.ObjectDisposedException: The document store has already been disposed and cannot be used
Object name: 'DocumentStore'.

This works fine localhost without the API key

Missing dlls in nuget 3.2.0 package

While invoking
services.AddHangfire(c => c.UseRavenStorage(ravenConfig.Url, ravenConfig.Database));
it complains of missing dlls like:

  • Raven.Abstractions (3.5.4)
  • Raven.Lightweight (3.5.4)

They are missing under package folder.
I'm using Raven.Client v4.1.4, seems like missing dlls are not included anymore neither of these packages.

Exception with fire and forget

Hello, I updated with the last version which seems to be supported in asp .net core

This is what I do:

GlobalConfiguration.Configuration.UseRavenStorage(ravenDBHost, "Hangfire");

var client = new BackgroundJobServer();
BackgroundJob.Enqueue(() => Console.WriteLine("Background Job: Hello, world!"));

I am getting an error such as this:

{Raven.Imports.Newtonsoft.Json.JsonSerializationException: Could not read value for property: Job ---> Raven.Imports.Newtonsoft.Json.JsonSerializationException: Could not read value for property:

at System.Reflection.TypeExtensions.GetMethod(Type type, String name)
at Hangfire.Raven.RavenJsonMethodConverter.Read(Type type, Object value, JsonSerializer serializer)
at Hangfire.Raven.RavenJsonConverterBase`1.ReadJson(JsonReader reader, Type type, Object existingValue, JsonSerializer serializer)
at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) in C:\Builds\RavenDB-3.5-RC\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 1769
at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target) in C:\Builds\RavenDB-3.5-RC\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 900
at Raven.Imports.Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id) in C:\Builds\RavenDB-3.5-RC\Imports\Newtonsoft.Json\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 2005

**Could not convert document RavenJobs/c80515fa-c78f-4f12-a39e-4e5e30ea1060 to entity of type Hangfire.Raven.Entities.RavenJob**

I see that there is new record in the RavenDB

Please assist.

Up-to-date?

Good afternoon everyone,

I am currently developing a project in .NET Core 2.2 requiring to use Hangfire. As you already understood, we are also using a NoSQL database through RavenDB.

My question for this repository that seems pretty attracting is :

Is this up to date and ready to use with the current version of the following frameworks ?

  • Microsoft.AspNetCore v2.2.0 (.NET Core 2.2)
  • Hangfire v1.7.6
  • Hangfire.AspNetCore v1.7.6
  • RavenDB.Client v4.2.2

Cheers guys :D

Doesn't work on full .NET Framework anymore (targets netcoreapp2.0)

Is there a specific reason for targetting netcoreapp2.0 instead of netstandard2.0 which, as I understand it, is recommended for libraries?

If not, it would be nice to switch to targetting netstandard2.0 since that is "implemented" in the full .NET Framework from version 4.6.1, enabling the same assembly to be used from both .NET Core and the full framework.

Dashboard not working yet

using Hangfire;
using HangFire.Raven.Storage;
using Microsoft.Owin;
using Owin;

[assembly: OwinStartupAttribute(typeof(HangfireServer.Startup))]
namespace HangfireServer
{
    public partial class Startup
    {
        public void Configuration(IAppBuilder app)
        {
            ConfigureAuth(app);
            GlobalConfiguration.Configuration.UseRavenStorage("http://localhost:8080", "hangfire");
            app.UseHangfireDashboard();
            app.UseHangfireServer();
        }
    }
}

image

Any ideas why? A database titled "hangfire" does exist and the ravendb server is running at http://localhost:8080.

Embedded storage question

Why GlobalConfiguration.Configuration.UseEmbeddedRavenStorage() option is removed since 2.0 version? Is new way exist to configure it? In README this way is stayed. I am confused a little...

Requires rights to System database

When not using a connection string, the way the DocumentStore is constructed using the DefaultDatabase property requires read-access to the System database. In certain environments (like RavenHQ) that isn't granted โ€“ leading to an exception on start up.

I seems that constructing the URL for a specific database manually, f.ex. https://ravenserver/databases/foo and not setting DefaultDatabase avoids this problem.

Are there any drawbacks to this I'm not seeing atm.?

RecurringJob.RemoveIfExists throws an object reference not set exception

Any attempt to use RecurringJob.RemoveIfExists with throw an object reference not set exception if the job id doesn't exist in the underlying RavenDb storage.

The exception originates in the Hangfire.Raven.RavenWriteOnlyTransaction.RemoveFromSet method.

This behaviour is not consistent with other Hangfire storage implementations, they will remove the job if it exists and won't throw an exception if it doesn't. See the documentation at the following link:

http://docs.hangfire.io/en/latest/background-methods/performing-recurrent-tasks.html

Latest NuGet Package

Hello,

When you get a chance could you please publish the latest NuGet package.

Many thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.