- Difficulty: Medium
- Labels:
backend, cron, escrow
Description
Sometimes users forget to close a video call session, leaving funds locked in escrow indefinitely. We need a automated cron job that periodically checks for inactive/zombie sessions and marks them for arbitration or automatic closure.
Technical Scope & Steps
- Install
node-cron or set up a task scheduler.
- Write a job that queries for active sessions where the last expert heartbeat is older than 1 hour.
- Transition their database status to
inactive_pending_settlement.
- Send an alert or log an administrative flag for dispute resolution.
Acceptance Criteria
- Job executes successfully on the defined schedule.
- Inactive sessions are cleanly identified without impacting active sessions.
- Detailed log output records every session updated by the automated job.
backend,cron,escrowDescription
Sometimes users forget to close a video call session, leaving funds locked in escrow indefinitely. We need a automated cron job that periodically checks for inactive/zombie sessions and marks them for arbitration or automatic closure.
Technical Scope & Steps
node-cronor set up a task scheduler.inactive_pending_settlement.Acceptance Criteria