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