Skip to content

Commit 11ed568

Browse files
committed
fix redis esm build
1 parent 55b7acf commit 11ed568

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

packages/redis-worker/src/worker.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { nanoid } from "nanoid";
1919
import pLimit from "p-limit";
2020
import { z } from "zod";
2121
import { type AnyQueueItem, SimpleQueue } from "./queue.js";
22-
import { parseExpression } from "cron-parser";
22+
import cronParser from "cron-parser";
2323

2424
export const CronSchema = z.object({
2525
cron: z.string(),
@@ -1130,9 +1130,10 @@ class Worker<TCatalog extends WorkerCatalog> {
11301130
}
11311131

11321132
private calculateNextScheduledAt(cron: string, lastTimestamp?: Date): Date {
1133-
const scheduledAt = parseExpression(cron, {
1134-
currentDate: lastTimestamp,
1135-
})
1133+
const scheduledAt = cronParser
1134+
.parseExpression(cron, {
1135+
currentDate: lastTimestamp,
1136+
})
11361137
.next()
11371138
.toDate();
11381139

0 commit comments

Comments
 (0)