new memoryScheduler()
An in-memory implementation of scheduler.
Methods
-
<static> getTasks() → {Object}
-
Returns:
Promise
- Type
- Object
-
<static> init(_eventHandlerMap)
-
Parameters:
Name Type Description _eventHandlerMap -
<static> isScheduled(eventID) → {Object}
-
Parameters:
Name Type Description eventIDReturns:
Promise
- Type
- Object
-
<static> schedule(eventID, context, interval, delay, exclusive, timeout) → {Object}
-
Schedule a task.
Parameters:
Name Type Description eventIDwhich event to fire
contextwhat to pass to the event
intervalThe interval to invoke the callback
delayThe number of milliseconds after which the event will be fired for the first time.
exclusiveIf true, then will not execute if another event named with the same eventID is already executing.
timeoutThe number of milliseconds, after which the schedule will declare the event has timed out, and will fire the reject on any promise that was returned.
Returns:
Promise
- Type
- Object
-
<static> shutdown() → {Object}
-
Returns:
Promise
- Type
- Object
-
<static> unschedule(eventID) → {Object}
-
Parameters:
Name Type Description eventIDReturns:
Promise
- Type
- Object