Open RomanKreisel opened 2 years ago
@RomanKreisel - do you have a repo where I can reproduce at my end
@imranmomin on my local machine this situation can be reproduced by replacing https://github.com/imranmomin/Hangfire.AzureCosmosDb/blob/6e6b0400f02b4cf490edd2e29f278892ccaf8afa/sample/Program.cs#L37 with another overload (using CosmosClient instance in parameters):
o.UseAzureCosmosDbStorage(new CosmosClient(url, secretKey, cosmoClientOptions), database, collection);
Also, this line should be removed because it is redundant. https://github.com/imranmomin/Hangfire.AzureCosmosDb/blob/6e6b0400f02b4cf490edd2e29f278892ccaf8afa/sample/Program.cs#L40
Jobs are enqueued but not executed. There are nothing extraordinary in logs.
UPD: The reason is that updating options on the Client instance has no effect, while it is actively used.
As a possible workaround Init API can be changed to use CosmosClientBuilder
instead of CosmosClient
, as in this simple implementation
This problem is also relevant to me. Also, I hope for the possibility of adding CosmosDb using ConnectionString
For me, data got saved in Cosmos Db, but Jobs never being executed. I am using MassTransit with ServiceBus. Did anyone encounter the same issue?
Has this issue already been solved? I've got the same problem and this makes the extension unusable for me..
Having the same issue. This library is not usable until this is fixed.
Use this overload to run the jobs. UseAzureCosmosDbStorage(url, secretKey, database, collection, cosmoClientOptions); With CosmosClient , it will enqueue the job but will not run.
I have a pretty standard setup (using ASP.NET Core 6, following examples from hangfire.io and this github page), but the jobs are never being executed.