Skip to content

Commit b724990

Browse files
committed
fix idempoentency
1 parent 06886c5 commit b724990

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/core-services/src/services/processing.service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
PluginError,
1414
ProcessorError,
1515
} from "@curatedotfun/utils";
16+
import { randomUUID } from "crypto";
1617
import { Logger } from "pino";
1718
import { DistributionService } from "./distribution.service";
1819
import { IBaseService } from "./interfaces/base-service.interface";
@@ -47,7 +48,8 @@ export class ProcessingService implements IBaseService {
4748
config: ProcessConfig,
4849
options: ProcessOptions,
4950
): Promise<SelectProcessingJob> {
50-
const { submissionId, feedId, idempotencyKey, retryOfJobId } = options;
51+
const { submissionId, feedId, retryOfJobId } = options;
52+
const idempotencyKey = options.idempotencyKey ?? randomUUID();
5153

5254
if (!submissionId || !feedId) {
5355
throw new ProcessorError(

0 commit comments

Comments
 (0)