Method
constructor
(
{
id,
type,
executor,
interval = 0,
initialDelay = 0,
retryOnFailInterval = 0,
onFailedCallback = noop,
}: TaskOptions,
)
Source from the content-addressed store, hash-verified
| 17 | private readonly onFailedCallback: (failedAttemptsCount: number) => void |
| 18 | |
| 19 | constructor( |
| 20 | { |
| 21 | id, |
| 22 | type, |
| 23 | executor, |
| 24 | interval = 0, |
| 25 | initialDelay = 0, |
| 26 | retryOnFailInterval = 0, |
| 27 | onFailedCallback = noop, |
| 28 | }: TaskOptions, |
| 29 | ) { |
| 30 | this.id = id |
| 31 | this.type = type |
| 32 | this.interval = interval |
| 33 | this.retryOnFailInterval = retryOnFailInterval |
| 34 | this.internalTime = now() + initialDelay |
| 35 | this.executor = executor |
| 36 | this.onFailedCallback = onFailedCallback |
| 37 | } |
| 38 | |
| 39 | get time() { |
| 40 | return this.internalTime |
Callers
nothing calls this directly
Tested by
no test coverage detected