Skip to content

Scheduler: past-due jobs need investigation after adding new insight collectors #626

@lbedner

Description

@lbedner

Problem

After adding new insight collector jobs (Plausible Analytics, GitHub Events), these jobs don't appear in the scheduler unless SCHEDULER_FORCE_UPDATE=true is set on restart. The persisted job store (SQLite) only contains jobs that existed at first startup.

Jobs showing as "Past due":

  • Insight: GitHub Traffic — registered but past due (scheduler container hasn't restarted)
  • Daily Database Backup — past due

Jobs missing entirely:

  • Insight: Plausible Analytics (newly added, hourly)
  • Insight: GitHub Events (newly added, daily)

Root Cause

The scheduler uses _job_exists_in_database() to check before adding jobs. Since the Plausible and GitHub Events jobs were added to the code after the scheduler's persistent store was initialized, they never got created. The existing jobs show "Past due" because the scheduler container hasn't been restarted.

Fix

  1. Restart scheduler with SCHEDULER_FORCE_UPDATE=true to recreate all jobs from code
  2. Consider: should new jobs be auto-detected on startup even without force update?
  3. The yellow dot for past-due jobs was added in this session as a visual indicator

Related

  • Plausible collection interval changed from 24h to 1h
  • last_collected_at column added to insight_source for accurate staleness tracking

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions