Closed bzumhagen closed 2 years ago
According to hangfire documentation, queue priority order should be able to be specified (either via alphanumeric order or array index)
See: https://docs.hangfire.io/en/latest/background-processing/configuring-queues.html
Current implementation just grabs the earliest enqueued job, regardless of queue.
See: https://github.com/imranmomin/Hangfire.AzureCosmosDb/blob/1ed52d4ff05c34ba11654ca20c27786bd2c2ee13/src/Queue/JobQueue.cs#L39
I think this could be resolved by ordering by queue name (alphanumeric desc) first, then ordering by enqueue time.
This would require a composite index.
@imranmomin FYI I've opened a PR with a change that I think will enable this.
https://github.com/imranmomin/Hangfire.AzureCosmosDb/pull/28
According to hangfire documentation, queue priority order should be able to be specified (either via alphanumeric order or array index)
See: https://docs.hangfire.io/en/latest/background-processing/configuring-queues.html
Current implementation just grabs the earliest enqueued job, regardless of queue.
See: https://github.com/imranmomin/Hangfire.AzureCosmosDb/blob/1ed52d4ff05c34ba11654ca20c27786bd2c2ee13/src/Queue/JobQueue.cs#L39
I think this could be resolved by ordering by queue name (alphanumeric desc) first, then ordering by enqueue time.
This would require a composite index.