feat: rm job data parsing
This commit is contained in:
@@ -209,12 +209,10 @@ export async function scheduleWorkflow(id: string, userId: string, cronExpressio
|
|||||||
export async function cancelScheduledWorkflow(robotId: string) {
|
export async function cancelScheduledWorkflow(robotId: string) {
|
||||||
try {
|
try {
|
||||||
const jobs = await pgBoss.getSchedules();
|
const jobs = await pgBoss.getSchedules();
|
||||||
|
|
||||||
console.log("Scheduled JOBS", jobs);
|
|
||||||
|
|
||||||
const matchingJobs = jobs.filter((job: any) => {
|
const matchingJobs = jobs.filter((job: any) => {
|
||||||
try {
|
try {
|
||||||
const data = JSON.parse(job.data);
|
const data = job.data;
|
||||||
return data && data.id === robotId;
|
return data && data.id === robotId;
|
||||||
} catch {
|
} catch {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user