@types/bull
Advanced tools
Comparing version 3.3.20 to 3.4.0
@@ -1,2 +0,2 @@ | ||
// Type definitions for bull 3.3 | ||
// Type definitions for bull 3.4 | ||
// Project: https://github.com/OptimalBits/bull | ||
@@ -13,2 +13,3 @@ // Definitions by: Bruno Grieder <https://github.com/bgrieder> | ||
// Alec Brunelle <https://github.com/aleccool213> | ||
// Dan Manastireanu <https://github.com/danmana> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -27,5 +28,5 @@ // TypeScript Version: 2.8 | ||
(queueName: string, opts?: Bull.QueueOptions): Bull.Queue; | ||
(queueName: string, url?: string): Bull.Queue; // tslint:disable-line unified-signatures | ||
(queueName: string, url: string, opts?: Bull.QueueOptions): Bull.Queue; // tslint:disable-line unified-signatures | ||
new (queueName: string, opts?: Bull.QueueOptions): Bull.Queue; | ||
new (queueName: string, url?: string): Bull.Queue; // tslint:disable-line unified-signatures | ||
new (queueName: string, url: string, opts?: Bull.QueueOptions): Bull.Queue; // tslint:disable-line unified-signatures | ||
}; | ||
@@ -97,2 +98,8 @@ | ||
}; | ||
/** | ||
* A timeout for when the queue is in `drained` state (empty waiting for jobs). | ||
* It is used when calling `queue.getNextJob()`, which will pass it to `.brpoplpush` on the Redis client. | ||
*/ | ||
drainDelay?: number; | ||
} | ||
@@ -148,2 +155,7 @@ | ||
/** | ||
* Ensure this job is never ran again even if attemptsMade is less than job.attempts. | ||
*/ | ||
discard(): Promise<void>; | ||
/** | ||
* Returns a promise that resolves to the returned data when the job has been finished. | ||
@@ -156,2 +168,14 @@ * TODO: Add a watchdog to check if the job has finished periodically. | ||
/** | ||
* Moves a job to the `completed` queue. Pulls a job from 'waiting' to 'active' | ||
* and returns a tuple containing the next jobs data and id. If no job is in the `waiting` queue, returns null. | ||
*/ | ||
moveToCompleted(returnValue?: string, ignoreLock?: boolean): Promise<[any, JobId] | null>; | ||
/** | ||
* Moves a job to the `failed` queue. Pulls a job from 'waiting' to 'active' | ||
* and returns a tuple containing the next jobs data and id. If no job is in the `waiting` queue, returns null. | ||
*/ | ||
moveToFailed(errorInfo: { message: string; }, ignoreLock?: boolean): Promise<[any, JobId] | null>; | ||
/** | ||
* Promotes a job that is currently "delayed" to the "waiting" state and executed as soon as possible. | ||
@@ -213,2 +237,7 @@ */ | ||
cron: string; | ||
/** | ||
* Start date when the repeat job should start repeating (only with cron). | ||
*/ | ||
startDate?: Date | string | number; | ||
} | ||
@@ -282,2 +311,7 @@ | ||
removeOnFail?: boolean; | ||
/** | ||
* Limits the amount of stack trace lines that will be recorded in the stacktrace. | ||
*/ | ||
stackTraceLimit?: number; | ||
} | ||
@@ -629,2 +663,7 @@ | ||
/** | ||
* A Job is waiting to be processed as soon as a worker is idling. | ||
*/ | ||
on(event: 'waiting', callback: WaitingEventCallback): this; | ||
/** | ||
* A job has started. You can use `jobPromise.cancel()` to abort it | ||
@@ -666,2 +705,7 @@ */ | ||
/** | ||
* A job successfully removed. | ||
*/ | ||
on(event: 'removed', callback: RemovedEventCallback<T>): this; | ||
/** | ||
* Old jobs have been cleaned from the queue. | ||
@@ -673,2 +717,8 @@ * `jobs` is an array of jobs that were removed, and `type` is the type of those jobs. | ||
on(event: 'cleaned', callback: CleanedEventCallback<T>): this; | ||
/** | ||
* Emitted every time the queue has processed all the waiting jobs | ||
* (even if there can be some delayed jobs not yet processed) | ||
*/ | ||
on(event: 'drained', callback: EventCallback): this; // tslint:disable-line unified-signatures | ||
} | ||
@@ -698,4 +748,8 @@ | ||
type CleanedEventCallback<T = any> = (jobs: Array<Job<T>>, status: JobStatus) => void; | ||
type RemovedEventCallback<T = any> = (job: Job<T>) => void; | ||
type WaitingEventCallback = (jobId: JobId) => void; | ||
} | ||
export = Bull; |
{ | ||
"name": "@types/bull", | ||
"version": "3.3.20", | ||
"version": "3.4.0", | ||
"description": "TypeScript definitions for bull", | ||
@@ -56,5 +56,11 @@ "license": "MIT", | ||
"githubUsername": "aleccool213" | ||
}, | ||
{ | ||
"name": "Dan Manastireanu", | ||
"url": "https://github.com/danmana", | ||
"githubUsername": "danmana" | ||
} | ||
], | ||
"main": "", | ||
"types": "", | ||
"repository": { | ||
@@ -69,4 +75,4 @@ "type": "git", | ||
}, | ||
"typesPublisherContentHash": "a16ea0b40ca51797cf736a599634d790c63f912c6a72908eb0082edbba7021f0", | ||
"typesPublisherContentHash": "25ee7e0608dc37a84c7e3548b1de266dbd0a057bb6fb4afb0e29761c5e2b5b76", | ||
"typeScriptVersion": "2.8" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Tue, 21 Aug 2018 16:28:53 GMT | ||
* Last updated: Mon, 22 Oct 2018 19:29:27 GMT | ||
* Dependencies: ioredis, bluebird | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Bruno Grieder <https://github.com/bgrieder>, Cameron Crothers <https://github.com/JProgrammer>, Marshall Cottrell <https://github.com/marshall007>, Weeco <https://github.com/weeco>, Gabriel Terwesten <https://github.com/blaugold>, Oleg Repin <https://github.com/iamolegga>, David Koblas <https://github.com/koblas>, Bond Akinmade <https://github.com/bondz>, Wuha Team <https://github.com/wuha-team>, Alec Brunelle <https://github.com/aleccool213>. | ||
These definitions were written by Bruno Grieder <https://github.com/bgrieder>, Cameron Crothers <https://github.com/JProgrammer>, Marshall Cottrell <https://github.com/marshall007>, Weeco <https://github.com/weeco>, Gabriel Terwesten <https://github.com/blaugold>, Oleg Repin <https://github.com/iamolegga>, David Koblas <https://github.com/koblas>, Bond Akinmade <https://github.com/bondz>, Wuha Team <https://github.com/wuha-team>, Alec Brunelle <https://github.com/aleccool213>, Dan Manastireanu <https://github.com/danmana>. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30920
627