trigger.dev icon indicating copy to clipboard operation
trigger.dev copied to clipboard

[TRI-5835] Add the concurrencyKey to the run ctx

Open matt-aitken opened this issue 6 months ago • 1 comments

You can trigger a run with a concurrencyKey to create a copy of a queue at runtime. It would be useful if this value would come through to the actual task when it executes (via the ctx).

await myTask.trigger(payload, {
  concurrencyKey: "user-123",
  queue: "user-queue"
});
export const myTask = task({
  id: "my-task",
  run: async (payload, { ctx }) => {
    // We should add ctx.concurrencyKey
    // "user-123"
    ctx.concurrencyKey
  }
});

TRI-5835

matt-aitken avatar Jul 09 '25 10:07 matt-aitken

Hi! I'd like to work on this issue. I'm currently exploring it and will update my progress here. Could you please assign it to me?

omkardongre avatar Jul 15 '25 20:07 omkardongre