Skip to content

[S6] Implement scheduled reconciliation (daily cron) #63

@krakenhavoc

Description

@krakenhavoc

Description

BullMQ repeatable job that runs reconciliation for all active installations daily.

Implementation

  • BullMQ repeatable job: cron 0 2 * * * (02:00 UTC daily)
  • Job iterates all active installations → all active repo configs
  • Enqueues individual reconciliation jobs for each repo config
  • Stagger jobs (add random delay per job) to avoid GitHub API rate limit spikes

Rate Limit Management

  • Track X-RateLimit-Remaining from GitHub API responses
  • If remaining < 100, pause processing and wait until reset time
  • Log rate limit warnings

Acceptance Criteria

  • Cron job runs daily at 02:00 UTC
  • All active repos are reconciled
  • Rate limits are respected
  • Staggered processing prevents burst API usage
  • Certs expiring within threshold are renewed

Metadata

Metadata

Assignees

No one assigned

    Labels

    github-integrationGitHub App + Action integrationqueueBullMQ / async processingreconcilerReconciliation enginesprint-6Sprint 6: PR Validation & Scheduled Reconciliation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions