Hello everyone!
I am trying to use Hangfire to schedule a notification with SignalR.
For some odd reason, the notifications through SignalR work completely fine if Hangfire is not involved. When I involve Hanfire(tried enqueue, schedule), the method gets called for sure(I check a separate log file), and yet the notifications are not sent out to the clients…
How I am using Hangfire enqueue/schedule?
BackgroundJob.Enqueue(() => SendNotifications(notification));
The method:
public void SendNotifications(Notification notification)
{
GlobalHost.ConnectionManager.GetHubContext().Clients.All.Invoke(“notification”, notification);
}
The Hangfire dashboard doesn’t register any problems.
It would be great if anyone could help me find the problem, and solution. Thank you!