Skip to content

Commit 085a861

Browse files
committed
SDK: Fix for calling trigger and passing a custom queue
1 parent 44a331d commit 085a861

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/itchy-chairs-itch.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@trigger.dev/sdk": patch
3+
---
4+
5+
Fix for calling trigger and passing a custom queue

packages/trigger-sdk/src/v3/shared.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ export function createTask<TInput = void, TOutput = unknown, TInitOutput extends
353353
{
354354
payload: payloadPacket.data,
355355
options: {
356-
queue: params.queue,
356+
queue: options?.queue ?? params.queue,
357357
concurrencyKey: options?.concurrencyKey,
358358
test: taskContext.ctx?.run.isTest,
359359
payloadType: payloadPacket.dataType,
@@ -482,7 +482,7 @@ export function createTask<TInput = void, TOutput = unknown, TInitOutput extends
482482
options: {
483483
dependentAttempt: ctx.attempt.id,
484484
lockToVersion: taskContext.worker?.version, // Lock to current version because we're waiting for it to finish
485-
queue: params.queue,
485+
queue: options?.queue ?? params.queue,
486486
concurrencyKey: options?.concurrencyKey,
487487
test: taskContext.ctx?.run.isTest,
488488
payloadType: payloadPacket.dataType,

0 commit comments

Comments
 (0)