I’m facing a Hangfire.Common.JobLoadException
while working with a Hangfire job in a microservices architecture that utilizes the StackExchange.Redis package and single AWS ElastiCache. The job is associated with three services: GraphQL, Deal, and Product.
When I schedule the job in the GraphQL service, it executes either in Deal or Offer, and receive the following exception:
Exception:
Hangfire.Common.JobLoadException: Could not load the job. See inner exception for the details.
---> System.IO.FileNotFoundException: Could not resolve assembly 'Services.GraphQL.Infrastructure'.
The error stack trace indicates that the assembly cannot be resolved, which leads to the job failing to load. I’ve used the following code to schedule the job:
C# Code
RecurringJob.AddOrUpdate(jobId, queue, methodCall, cronExpression, options);
I’m trying to use the Queue
attribute to specify a custom queue name for my jobs, but it still stores the queue name as “default.”
Has anyone experienced a similar issue or have suggestions on how to resolve this? Any insights would be greatly appreciated!