Skip to content

Commit

Permalink
chore: delete unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
joseferben committed Oct 13, 2024
1 parent 272344c commit f867c2c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
15 changes: 0 additions & 15 deletions src/queue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,21 +278,6 @@ export function defineQueue(opts: QueueOptions): Queue {
UPDATE plainjob_jobs SET status = ${JobStatus.Pending} WHERE status = ${JobStatus.Processing} AND next_run_at < @threshold
`);

const getAndMarkJobAsProcessingStmt = db.prepare(`
UPDATE plainjob_jobs SET status = ${JobStatus.Processing}
WHERE id = (
SELECT id FROM plainjob_jobs
WHERE status = ${JobStatus.Pending} AND type = @type AND next_run_at <= @now
ORDER BY next_run_at LIMIT 1
)
`);

const getUpdatedJobStmt = db.prepare(`
SELECT * FROM plainjob_jobs
WHERE status = ${JobStatus.Processing} AND type = @type AND next_run_at <= @now
ORDER BY next_run_at LIMIT 1
`);

const getJobIdToProcessNextStmt = db.prepare(`
SELECT id
FROM plainjob_jobs
Expand Down
2 changes: 1 addition & 1 deletion test/test-suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ export function getTestSuite(
});
});

describe("worker", async () => {
describe("process (queue and worker", async () => {
let connection: Connection;

beforeEach(() => {
Expand Down

0 comments on commit f867c2c

Please sign in to comment.