trigger.dev
trigger.dev copied to clipboard
[TRI-5835] Add the concurrencyKey to the run ctx
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
}
});
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?