feat: user specific queue for run
This commit is contained in:
@@ -658,10 +658,12 @@ router.post('/runs/run/:id', requireSignIn, async (req: AuthenticatedRequest, re
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
const userQueueName = `execute-run-user-${req.user.id}`;
|
||||||
|
|
||||||
// Queue the execution job
|
// Queue the execution job
|
||||||
await pgBoss.createQueue('execute-run');
|
await pgBoss.createQueue(userQueueName);
|
||||||
|
|
||||||
const jobId = await pgBoss.send('execute-run', {
|
const jobId = await pgBoss.send(userQueueName, {
|
||||||
userId: req.user.id,
|
userId: req.user.id,
|
||||||
runId: req.params.id,
|
runId: req.params.id,
|
||||||
browserId: plainRun.browserId
|
browserId: plainRun.browserId
|
||||||
|
|||||||
Reference in New Issue
Block a user