job_cancelled teardown communications.status becomes cancelled, the system is intended to halt routine lifecycle automations:removeAllScheduled(inspectionId) removes delayed BullMQ flow jobs matching *-inspection_{id}.flowEventTriggerer('job_cancelled', …) runs cancellation-specific flow actions only.queueFlowOnJobDisable sets FlowOnJob.active = false after a 5 second delay so job_cancelled actions can still query flows.reminders / follow_up (or other delayed actions) not being fully cancelled, not a same-day duplicate send.handleEventTriggerdByBull.ts blocks actions when FlowOnJob is inactive except job_cancelled, but does not check whether the inspection/quote status === 'cancelled' before rendering email or SMS.reminders / follow_up are skipped only when status is unconfirmed, not cancelled.payment_created is triggered from inspectionStream.ts on payment changes without a cancelled guard (unlike services_updated / job_rescheduled, which require confirmed).attik-backend/src/events/streamHandlers/inspectionStream.ts when status transitions to cancelled.attik-backend/src/util/functions/actionFlows/removeAllScheduled.ts — Redis SCAN + remove delayed jobs by pattern; decision needed whether all job id formats are covered (flow_* and scheduled-flow_* prefixes from flowEventTriggerer.ts and handleScheduledFlowEvent.ts).attik-backend/src/events/bullmq/flowOnJobDisableWorker.ts — JOB_DELAY_MS = 5000 before FlowOnJob.active is false; race window for non–job_cancelled sends.attik-backend/src/util/functions/actionFlows/handleEventTriggerdByBull.ts — final gate before renderEmailFromTemplate / renderSmsFromTemplate; add cancelled-job filtering (decision needed: allowlist only job_cancelled vs all actionType values).attik-backend/src/util/functions/actionFlows/flowEventTriggerer.ts — queues delayed actions; should not enqueue routine lifecycle actions for cancelled jobs.attik-backend/src/routes/inspection.ts — POST /:id/cancel sets status, canceledBy, canceledAt (canonical cancel path).inspectionStream.ts — payment_created on hasPaymentsChange without status check.chargeUpdateResolveAndTrigger.ts — skips non-confirmed inspections for charge events; confirm cancelled is excluded.handleFlowStart.ts / handleScheduledFlowEvent.ts — time-based scheduling relative to inspection datetime; ensure cancel cleanup removes scheduled-flow_* jobs and nothing reschedules them while cancelled.handleRescheduleTimeUpdates.ts — reschedules time-based jobs on datetime change; decision needed whether this can run on cancelled inspections.job_cancelled flows should send email/SMS (product configuration; only non-teardown sends are in scope).attik-backend/src/util/functions/actionFlows/ACTIVITY_SYSTEM_README.md (related systems; action flow worker in attik-backend/src/events/bullmq/flowWorker.ts)attik-frontend/src/app/tools/action-flow/[flow_id]/data/eventCategories.ts (job_cancelled, follow_up, reminders, payment_created event ids)Please authenticate to join the conversation.
Planned
Main App
2 days ago
Linear
Get notified by email when there are changes.
Planned
Main App
2 days ago
Linear
Get notified by email when there are changes.