Use correct overload param when invoking a job outside of a run (fixes #802)

This commit is contained in:
Eric Allam
2024-01-10 10:50:12 +00:00
parent 73cb8839a5
commit 8277f4d249
2 changed files with 8 additions and 3 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/sdk": patch
---
Use correct overload param when invoking a job outside of a run #802
+3 -3
View File
@@ -185,8 +185,8 @@ export class Job<
typeof this.options.concurrencyLimit === "number"
? this.options.concurrencyLimit
: typeof this.options.concurrencyLimit === "object"
? { id: this.options.concurrencyLimit.id, limit: this.options.concurrencyLimit.limit }
: undefined,
? { id: this.options.concurrencyLimit.id, limit: this.options.concurrencyLimit.limit }
: undefined,
};
}
@@ -263,7 +263,7 @@ export class Job<
throw new Error("Cannot invoke a job from within a run without a cacheKey.");
}
return await triggerClient.invokeJob(this.id, param1, param3);
return await triggerClient.invokeJob(this.id, param1, param2);
}
async invokeAndWaitForCompletion(