Don't show duplicate Job warning if it's an internal job
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@trigger.dev/sdk": patch
|
||||
---
|
||||
|
||||
Don't show duplicate Job warning if it's an internal job
|
||||
@@ -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.`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user