fix: revert

This commit is contained in:
karishmas6
2024-09-12 19:42:02 +05:30
parent c997ca7f9a
commit 7679febbdc

View File

@@ -28,7 +28,7 @@ const workflowQueue = new Queue('workflow', { connection });
export const worker = new Worker('workflow', async job => {
const { fileName, runId } = job.data;
try {
const result = await scheduleWorkflow(fileName, runId);
const result = await runWorkflow(fileName, runId);
return result;
} catch (error) {
console.error('Error running workflow:', error);
@@ -56,7 +56,7 @@ worker.on('failed', async (job: any, err) => {
console.log('Worker and queue have been closed after failure.');
});
async function scheduleWorkflow(fileName: string, runId: string) {
async function runWorkflow(fileName: string, runId: string) {
if (!runId) {
runId = uuid();
}
@@ -169,4 +169,4 @@ async function executeRun(fileName: string, runId: string) {
return false;
}
}
export { workflowQueue, scheduleWorkflow };
export { workflowQueue, runWorkflow };