Properly handle multiple jobs per report

This commit is contained in:
2024-03-24 03:05:53 -04:00
parent 55469939d5
commit d3f5a1ab8d
3 changed files with 60 additions and 10 deletions

View File

@ -180,10 +180,9 @@ export async function onRequestPost(context: RequestContext) {
const { current_user: currentUser } = context.data;
if (filesToProcess.length)
await context.env.DATA.put(
`coconutjob_${reportId}`,
`coconutdata_${reportId}`,
JSON.stringify({
attachments: filesToProcess,
token: crypto.randomUUID(),
}),
{
expirationTtl: 1800,