CadyIO / hangfire-ravendb

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

Some added work (most important: Multiple Queue handler) #11

Closed xinix00 closed 7 years ago

xinix00 commented 7 years ago

Added: Hangfire/JobQueues index Changed: JobQueue to handle multiple queues correct. Each worker can have only one queue to monitor (by design) Changed: all queries to be handled by one of the two indexes Changed: Hangfire.Core to include 1.6.4 Changed: RavenDB.Client to include 3.0.30155 Bugfix: Add StartedAt for a RavenServer Bugfix: Remove RavenServers/ prefix from server names for gui to not show error "Server is probably offline" Removed: Double execution of Indexes

xinix00 commented 7 years ago

I will check your new version tomorrow and merge it, to create a pull request without the need of resolving conflicts.

My new version allows only one queue per worker (fires an exception when you use multiple inside one worker). This is due to the design using "BlockingCollection", it will wait till an item gets added to the queue and release the thread to go ahead and grab it.

Possible ways to make it work (adding multiple queues to a worker):

Since I like the design using BlockingCollections to stop the thread and start as soon as an item gets added to the Queue, to me, I think it's a fair trade off to use: new Worker("queue_1"), new Worker("queue_2"),

Instead of: new Worker("queue_1", "queue_2")

Please let me know your thoughts

AustinWinstanley commented 7 years ago

This merge has conflics. Please clean those up @xinix00 and I will merge.