Skip to content

Latest commit

 

History

History
121 lines (81 loc) · 3.02 KB

API.md

File metadata and controls

121 lines (81 loc) · 3.02 KB

Classes

JobException

JobException for wrapping any Error objects raised here

Job

A Job to be run

JobException

JobException for wrapping any Error objects raised here

Kind: global class


Job

A Job to be run

Kind: global class


new Job(options)

Represents a job to be spawned.

Param Type Description
options object

The options for object for Job/Spawn


job.setExpiresAt() ⇒ number

Kind: instance method of Job
Summary:

Convert object to JSON object for JSON.stringify()


Returns: number -

The timestamp to expire at


job.pushExpiry() ⇒ number

Kind: instance method of Job
Summary:

Push the expiry back again by expires


Returns: number -

  • The new millisecond timestamp to expire at

job.setExpiresIn() ⇒ number

Kind: instance method of Job
Summary:

Set the expires in ms value


Returns: number -

  • New milliseconds until expiry time

job.possiblySetExpiresIn() ⇒ number

Kind: instance method of Job
Summary:

Set the expires in ms value, ignoring falsey values


Returns: number -

  • New milliseconds until expiry time

job.handleRunCallback()

Kind: instance method of Job
Summary:

Add extra run processing on top of Spawn for expires


job.toJSON() ⇒ object

Kind: instance method of Job
Summary:

Convert object to JSON object for JSON.stringify()


Returns: object -

The instance object to be turned into JSON


Job._classInit()

Class static initialisation

Kind: static method of Job