CadyIO / hangfire-ravendb

RavenDB job storage for Hangfire
https://www.nuget.org/packages/Hangfire.Raven/
18 stars 35 forks source link

Not accepting connection strings #13

Closed mjohnson0580 closed 7 years ago

mjohnson0580 commented 7 years ago

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.

AustinWinstanley commented 7 years ago

This was a good catch. I have implemented a fix and will include in a 2.1 release soon