You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lag is a companion class to JobSource for setting an extra delay before creating a new Job.
Basically, this is an array of possible (strictly ascending) delay values, in milliseconds, from which the one is fetched, depending on the (severity) level, increasing with each botched job and reset to zero after the first success.
Constructor
constlag=newLag([0,10,100,Infinity])
The only parameter corresponds to the values property.`
Write only property, the setter actually subscribes the Lag instance to the jobSource's events
level
Number
0
The current lag level
values
[Number]
[0]
Possible lag values
Methods
onFail ()
This method is registered with the jobSource's job-error event. In the base implementation, increases level by 1 unless it causes values oferflow, otherwise does nothing.
onSuccess ()
This method is registered with the jobSource's job-end and reset events. In the base implementation, resets level to 0.