feat: use workflowQueue
This commit is contained in:
@@ -10,7 +10,7 @@ import { chromium } from "playwright";
|
|||||||
import { browserPool } from "../server";
|
import { browserPool } from "../server";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import { uuid } from "uuidv4";
|
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, processGoogleSheetUpdates } from '../workflow-management/integrations/gsheet';
|
import { googleSheetUpdateTasks, processGoogleSheetUpdates } from '../workflow-management/integrations/gsheet';
|
||||||
@@ -280,16 +280,16 @@ router.put('/schedule/:fileName/', requireSignIn, async (req, res) => {
|
|||||||
|
|
||||||
const runId = uuid();
|
const runId = uuid();
|
||||||
|
|
||||||
// await workflowQueue.add(
|
await workflowQueue.add(
|
||||||
// 'run workflow',
|
'run workflow',
|
||||||
// { fileName, runId },
|
{ fileName, runId },
|
||||||
// {
|
{
|
||||||
// repeat: {
|
repeat: {
|
||||||
// pattern: cronExpression,
|
pattern: cronExpression,
|
||||||
// tz: timezone
|
tz: timezone
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// );
|
);
|
||||||
|
|
||||||
res.status(200).json({
|
res.status(200).json({
|
||||||
message: 'success',
|
message: 'success',
|
||||||
|
|||||||
Reference in New Issue
Block a user