Skip to content

Commit

Permalink
Don't show duplicate Job warning if it's an internal job
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-aitken committed Jan 16, 2024
1 parent 7df2f85 commit 0f342cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/sixty-toes-sparkle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@trigger.dev/sdk": patch
---

Don't show duplicate Job warning if it's an internal job
2 changes: 1 addition & 1 deletion packages/trigger-sdk/src/triggerClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ export class TriggerClient {
>(options: JobOptions<TTrigger, TIntegrations, TOutput>) {
const existingRegisteredJob = this.#registeredJobs[options.id];

if (existingRegisteredJob) {
if (existingRegisteredJob && options.__internal !== true) {
console.warn(
`[@trigger.dev/sdk] Warning: The Job "${existingRegisteredJob.id}" you're attempting to define has already been defined. Please assign a different ID to the job.`
);
Expand Down

0 comments on commit 0f342cd

Please sign in to comment.