Extends
Members
(static) services
Get the services required by this class. The 'jobs' service is requested automatically.
- Source:
(private) _di_allow_defer :boolean
If true, the injector will defer the class if the class requests any services that the container is missing. These services are filled in later and added to the prototype and any instances. True by default.
- boolean
- Inherited From:
- Source:
(private) _di_deferred_instances :Array.<module:flitter-di/src/Injectable~Injectable>
Collection of instances of this class that need to have the deferred service instances injected into them when the deferred services are finally provided.
- Source:
(private) _di_deferred_services :Array.<string>
List of services that were deferred and not provided at the time of injection.
- Array.<string>
- Source:
JOB_NAME :string
Set by the AgendaUnit when the job is loaded. The Flitter canonical name of the job. This is used to identify the job class to the Agenda scheduler.
- string
- Source:
Methods
(async, static) enqueue(whenopt, dataopt) → {Promise.<void>}
Queue a request to run this job at the specific time with the data.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
when |
string |
<optional> |
'now' | a time describing string - 'in 3 minutes'/'now'/'tomorrow' |
data |
object |
<optional> |
{} | optional data to be passed to the job |
- Source:
- Type
- Promise.<void>
exec(job, done)
Executed when the job is run. See the Agenda package docs for more info.
Name | Type | Description |
---|---|---|
job |
Job | Agenda job instance. See the Agenda package docs for more info. |
done |
function | should be called when the job completes |
- Source: