feat: call processGoogleSheetUpdates()
This commit is contained in:
@@ -13,7 +13,7 @@ import { uuid } from "uuidv4";
|
|||||||
import { workflowQueue } from '../workflow-management/scheduler';
|
import { workflowQueue } from '../workflow-management/scheduler';
|
||||||
import moment from 'moment-timezone';
|
import moment from 'moment-timezone';
|
||||||
import cron from 'node-cron';
|
import cron from 'node-cron';
|
||||||
import { googleSheetUpdateTasks } from '../workflow-management/integrations/gsheet';
|
import { googleSheetUpdateTasks, processGoogleSheetUpdates } from '../workflow-management/integrations/gsheet';
|
||||||
|
|
||||||
export const router = Router();
|
export const router = Router();
|
||||||
|
|
||||||
@@ -183,17 +183,14 @@ router.post('/runs/run/:fileName/:runId', async (req, res) => {
|
|||||||
`../storage/runs/${parsedRun.name}_${req.params.runId}.json`,
|
`../storage/runs/${parsedRun.name}_${req.params.runId}.json`,
|
||||||
JSON.stringify(run_meta, null, 2)
|
JSON.stringify(run_meta, null, 2)
|
||||||
);
|
);
|
||||||
|
|
||||||
res.send(true);
|
|
||||||
|
|
||||||
googleSheetUpdateTasks[req.params.runId] = {
|
googleSheetUpdateTasks[req.params.runId] = {
|
||||||
name: parsedRun.name,
|
name: parsedRun.name,
|
||||||
runId: req.params.runId,
|
runId: req.params.runId,
|
||||||
status: 'pending',
|
status: 'pending',
|
||||||
retries: 5,
|
retries: 5,
|
||||||
};
|
};
|
||||||
|
processGoogleSheetUpdates();
|
||||||
return;
|
return res.send(true);
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Could not destroy browser');
|
throw new Error('Could not destroy browser');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user