Skip to content

Commit

Permalink
Fix concurrency options ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
gearnode committed May 2, 2023
1 parent 212a63d commit 36422b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export interface HasDeferMetadata {
version: number;
cron?: string;
retry?: RetryPolicy;
concurrency?: Concurrency;
concurrency?: Concurrency | undefined;
};
}

Expand Down Expand Up @@ -248,7 +248,11 @@ export const defer: Defer = (fn, options) => {
}
}

ret.__metadata = { version: INTERNAL_VERSION, retry: retryPolicy };
ret.__metadata = {
version: INTERNAL_VERSION,
retry: retryPolicy,
concurrency: options?.concurrency,
};

return ret;
};
Expand Down

0 comments on commit 36422b1

Please sign in to comment.