Job
Extends:
API that handles the lifecycle for updating and maintaing local copies of a Job
Static Method Summary
Static Public Methods | ||
public static |
changeState(state: State, job: Job): Promise atomically changes a Job's state in the table |
|
public static |
complete(job: *): * |
|
public static |
enqueue(job: *): * |
|
public static |
fail(job: *): * |
|
public static |
lock(job: *): * |
|
public static |
nextBatch(n: *, ids: *): * |
Inherited Summary
From class Expressive | ||
public static |
create(): * creates a new inherited instance |
|
public |
debug: * |
|
public |
expressive emit |
|
public |
when(): * expressive once |
From class Table | ||
public static get |
table: Thinky:Table: * returns a reference to the raw Table object |
|
public static get |
tableName: * returns what the table name is, useful for raw |
|
public static |
createModel(config: Array): * creates a Thinky model |
|
public static |
drop(): * drops this table on the database, primarily used to clean up after tests |
|
public static |
empty(): * empties all rows from the table |
|
public static |
creates a new row on this Table |
|
public |
table: * |
Static Public Methods
public static changeState(state: State, job: Job): Promise source
atomically changes a Job's state in the table
Params:
Name | Type | Attribute | Description |
state | State | The state (as defined in Job.States) |
|
job | Job | The job |
public static nextBatch(n: *, ids: *): * source
Params:
Name | Type | Attribute | Description |
n | * | ||
ids | * |
Return:
* |