Is it possible to expose HeartbeatInterval to be configurable via the interface?

Hello,

After checking our SQL server activities, we noticed there is a call to update [HangFire].[Server].[LastHeartbeat] every 5 seconds.

I found the source code in in GitHub:

namespace Hangfire.Server
{
public class ServerHeartbeat : IServerComponent
{
private static readonly TimeSpan HeartbeatInterval = TimeSpan.FromSeconds(5);
ā€¦
}

I know we can download the source code to compile our own but we prefer not to do that to take advantage of future upgrades.

Is it possible to expose this HeartbeatInterval variable so we can configure it to a different value in future releases? Just like we can configure QueuePollInterval? This way we can configure it to update the field less often because our job only runs once a day.

Thanks a lot!

2 Likes

for those who searching this issue too https://api.hangfire.io/html/P_Hangfire_BackgroundJobServerOptions_HeartbeatInterval.htm