Skip to content

Commit

Permalink
return 429 if job is already running
Browse files Browse the repository at this point in the history
  • Loading branch information
rhanka committed Oct 14, 2024
1 parent 96e37ce commit a86fb64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/src/processStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ export const csvHandle = async (request: Request, options: Options): Promise<any
await sendJobUpdate(options.user, "L'appariement a bien commencé", options.randomKey);
return {msg: 'started', id: options.randomKey};
} else {
await sendJobUpdate(options.user, "Vous avez déjà un job qui tourne", options.randomKey);
return {msg: `already running or waiting ${jobsUser.length} jobs`}
request.res.status(429).send({msg: `There is already ${jobsUser.length} running or waiting jobs`});
return;
}
}

Expand Down

0 comments on commit a86fb64

Please sign in to comment.