feat: don't interrupt execution due to quota

This commit is contained in:
Ali BARIN
2023-03-09 15:13:50 +00:00
parent 8b81391e2f
commit ae3512fecf
4 changed files with 20 additions and 12 deletions

View File

@@ -12,6 +12,13 @@ export const worker = new Worker(
const { flowId } = job.data;
const flow = await Flow.query().findById(flowId).throwIfNotFound();
const quotaExceeded = await flow.checkIfQuotaExceeded();
if (quotaExceeded) {
return;
}
const triggerStep = await flow.getTriggerStep();
const { data, error } = await processFlow({ flowId });