Closed mbrevda closed 6 months ago
Hi! refreshInterval
is useful when execution time of task processing varies greatly (e.g., from a few seconds to an hour). Without this feature in this case you would have to set lockTimeout
= maximum expected time of task processing (an hour). As a result, if, for example, the application is restarted in the middle of this period, the lock would continue to hang for an hour.
With refreshInterval
you can specify lockTimeout
for example 1 minute and periodically update the lock, so in case of restarting the application you will have to wait not more than one minute, not an hour.
thanks!
Could you kindly elaborate on why
refreshInterval
is useful? It looks like we need to disable it (keep on losing locks when usingidentifier
) and I'm wondering what we'll be missing without it.Thanks!