Skip to content

Implement background job heartbeat and stuck-job detection #157

@Baskarayelu

Description

@Baskarayelu

Implement background job heartbeat and stuck-job detection

Description

  • Detect and surface stuck workers by tracking periodic job heartbeats.

Requirements and context

  • Persist heartbeat timestamp and mark stale jobs after configurable threshold.
  • Expose stale-job metric and alert-ready signal.

Suggested execution

  • Update worker runtime to emit heartbeat at fixed interval.
  • Add reconciliation process to mark and optionally requeue stale jobs.

Test and commit

  • Add tests for heartbeat updates and stale detection transitions.

Example commit message

  • feat(jobs): add heartbeat tracking and stale job detection

Guidelines

  • Avoid duplicate requeue for actively running jobs.
  • Keep logic resilient to short network interruptions.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions