feat: rm job data parsing

This commit is contained in:
Rohit
2025-03-29 18:58:44 +05:30
parent 28b3f650d6
commit 54c0a87681

View File

@@ -209,12 +209,10 @@ export async function scheduleWorkflow(id: string, userId: string, cronExpressio
export async function cancelScheduledWorkflow(robotId: string) {
try {
const jobs = await pgBoss.getSchedules();
console.log("Scheduled JOBS", jobs);
const matchingJobs = jobs.filter((job: any) => {
try {
const data = JSON.parse(job.data);
const data = job.data;
return data && data.id === robotId;
} catch {
return false;