We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f8cc89 commit d06fa05Copy full SHA for d06fa05
storage/framework/core/queue/src/process.ts
@@ -12,6 +12,15 @@ interface QueuePayload {
12
}
13
14
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() {
24
const jobs = await Job.all()
25
26
for (const job of jobs) {
@@ -41,6 +50,4 @@ export async function processJobs(): Promise<Ok<string, never>> {
41
50
log.info(`Successfully ran ${payload.displayName}`)
42
51
43
52
44
-
45
- return ok('All jobs processed successfully!')
46
53
0 commit comments