Skip to content

Commit

Permalink
Modifies JobAttributes.lockedAt to allow null values (#1340)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjramage committed Aug 4, 2021
1 parent c3825a6 commit b63c517
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/job/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface JobAttributes<
/**
* Date/time the job was locked.
*/
lockedAt?: Date;
lockedAt?: Date | null;

/**
* The priority of the job.
Expand Down
2 changes: 1 addition & 1 deletion lib/job/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const run = async function (this: Job): Promise<Job> {
this.attrs.lastFinishedAt = new Date();
}

this.attrs.lockedAt = undefined;
this.attrs.lockedAt = null;

await this.save().catch((error: Error) => {
debug(
Expand Down

0 comments on commit b63c517

Please sign in to comment.