Skip to content

Commit d06fa05

Browse files
chore: wip
1 parent 1f8cc89 commit d06fa05

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

storage/framework/core/queue/src/process.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ interface QueuePayload {
1212
}
1313

1414
export async function processJobs(): Promise<Ok<string, never>> {
15+
setInterval( async () => {
16+
await executeJobs()
17+
}, 1000)
18+
19+
20+
return ok('All jobs processed successfully!')
21+
}
22+
23+
async function executeJobs() {
1524
const jobs = await Job.all()
1625

1726
for (const job of jobs) {
@@ -41,6 +50,4 @@ export async function processJobs(): Promise<Ok<string, never>> {
4150
log.info(`Successfully ran ${payload.displayName}`)
4251
}
4352
}
44-
45-
return ok('All jobs processed successfully!')
4653
}

0 commit comments

Comments
 (0)