Don't show duplicate Job warning if it's an internal job

This commit is contained in:
Matt Aitken
2024-01-16 15:54:20 +00:00
parent 7df2f85a1f
commit 0f342cd1be
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/sdk": patch
---
Don't show duplicate Job warning if it's an internal job
+1 -1
View File
@@ -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.`
);