Skip to content

Commit

Permalink
[core] fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sroussey committed Apr 14, 2024
1 parent a1c902f commit 9e30048
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/job/PostgreSqlJobQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ export class PostgreSqlJobQueue<Input, Output> extends JobQueue<Input, Output> {
return await sql`
INSERT INTO job_queue(queue, fingerprint, input, runAfter, maxRetries)
VALUES (${this.queue!}, ${fingerprint}, ${
job.input as any
}::jsonb, ${job.createdAt.toISOString()}, ${job.maxRetries})
job.input as any
}::jsonb, ${job.createdAt.toISOString()}, ${job.maxRetries})
RETURNING id`;
});
}
Expand Down Expand Up @@ -161,8 +161,8 @@ export class PostgreSqlJobQueue<Input, Output> extends JobQueue<Input, Output> {
const status = output
? JobStatus.COMPLETED
: error && job.retries >= job.maxRetries
? JobStatus.FAILED
: JobStatus.PENDING;
? JobStatus.FAILED
: JobStatus.PENDING;
if (!output || error) job.retries += 1;
await this.sql.begin(async (sql) => {
const result = await sql`
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/job/SqliteJobQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class SqliteJobQueue<Input, Output> extends JobQueue<Input, Output> {
input: string,
runAfter: string | null,
deadlineAt: string | null,
maxRetries: number
maxRetries: number,
]
>(AddQuery);

Expand Down Expand Up @@ -183,8 +183,8 @@ export class SqliteJobQueue<Input, Output> extends JobQueue<Input, Output> {
const status = output
? JobStatus.COMPLETED
: error && job.retries >= job.maxRetries
? JobStatus.FAILED
: JobStatus.PENDING;
? JobStatus.FAILED
: JobStatus.PENDING;

const UpdateQuery = `
UPDATE job_queue
Expand Down

0 comments on commit 9e30048

Please sign in to comment.