feat: add date properties in Job (#26076)

This commit is contained in:
Budi Irawan
2018-05-30 09:01:47 +10:00
committed by Mohamed Hegazy
parent 12e3811181
commit 044f8c7d84
2 changed files with 11 additions and 0 deletions

View File

@@ -3,6 +3,7 @@
// Definitions by: Nicholas Penree <https://github.com/drudge>
// Amiram Korach <https://github.com/amiram>
// Christian D. <https://github.com/pc-jedi>
// Budi Irawan <https://github.com/deerawan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
@@ -72,6 +73,10 @@ export declare class Job extends events.EventEmitter {
// Should always be a number however currently it is a number when creating and a string when loading
// https://github.com/Automattic/kue/issues/1081
public created_at: string | number;
public updated_at: string | number;
public promote_at: string | number;
public failed_at: string | number;
public started_at: string | number;
public client: redisClientFactory.RedisClient;
private _max_attempts;

View File

@@ -41,6 +41,12 @@ function create() {
kue.Job.get(job.id, function (err: any, _job: kue.Job) {
console.log('get job', _job);
_job.created_at;
_job.promote_at;
_job.updated_at;
_job.failed_at;
_job.started_at;
});
kue.Job.get(job.id, 'video conversion', function (err: any, _job: kue.Job) {
console.log('get job', _job);