Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
glennmichael123 committed Jan 8, 2025
1 parent 1f8cc89 commit d06fa05
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions storage/framework/core/queue/src/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ interface QueuePayload {
}

export async function processJobs(): Promise<Ok<string, never>> {
setInterval( async () => {
await executeJobs()
}, 1000)


return ok('All jobs processed successfully!')
}

async function executeJobs() {
const jobs = await Job.all()

for (const job of jobs) {
Expand Down Expand Up @@ -41,6 +50,4 @@ export async function processJobs(): Promise<Ok<string, never>> {
log.info(`Successfully ran ${payload.displayName}`)
}
}

return ok('All jobs processed successfully!')
}

0 comments on commit d06fa05

Please sign in to comment.