Skip to content

Commit

Permalink
chore: change finishedErrors as scripts method (#2810)
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf authored Oct 9, 2024
1 parent f0cb07e commit f17317c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/classes/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -485,12 +485,12 @@ export class Queue<
*
* @param id - identifier
*/
async removeDeduplicationKey(id: string): Promise<number> {
const client = await this.client;
return client.del(`${this.keys.de}:${id}`);
}
async removeDeduplicationKey(id: string): Promise<number> {
const client = await this.client;

return client.del(`${this.keys.de}:${id}`);
}

/**
* Removes a repeatable job by its key. Note that the key is the one used
* to store the repeatable job metadata and not one of the job iterations
Expand Down
6 changes: 3 additions & 3 deletions src/classes/scripts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ export class Scripts {
}
}

finishedErrors = ({
finishedErrors({
code,
jobId,
parentKey,
Expand All @@ -608,7 +608,7 @@ export class Scripts {
parentKey?: string;
command: string;
state?: string;
}): Error => {
}): Error {
switch (code) {
case ErrorCode.JobNotExist:
return new Error(`Missing key for job ${jobId}. ${command}`);
Expand Down Expand Up @@ -637,7 +637,7 @@ export class Scripts {
default:
return new Error(`Unknown code ${code} error for ${jobId}. ${command}`);
}
};
}

private drainArgs(delayed: boolean): (string | number)[] {
const queueKeys = this.queue.keys;
Expand Down

0 comments on commit f17317c

Please sign in to comment.