diff --git a/backend/src/index.ts b/backend/src/index.ts index 397e38a..cfba707 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -289,7 +289,6 @@ await fastify.register(async (instance) => { return reply.code(401).send({ error: "Authentication required" }); } - const run = await populateWorkflow.createRun(); const populateOutcome = await beginDatasetPopulate( parsed.data.datasetId, auth.userId, @@ -308,6 +307,8 @@ await fastify.register(async (instance) => { throw new Error(`Unexpected populate claim outcome: ${populateOutcome}`); } + const run = await populateWorkflow.createRun(); + void runPopulateWorkflowInBackground({ input: parsed.data, run,