Skip to content

Conversation

Copy link

Copilot AI commented Feb 6, 2026

The problem statement requested clarification on whether jobs are per-SP or include batches of SPs.

Finding

Jobs are per-SP in pg-boss mode:

  • job_schedule_state table: one row per (jobType, spAddress) pair
  • Job payload: { spAddress: string, intervalSeconds: number }
  • Worker executes createDealForProvider() for single SP

Two scheduling modes exist:

  • pg-boss (recommended): Queue-based, strict per-SP isolation, individual next_run_at tracking
  • Legacy cron: Batch-based, calls createDealsForAllProviders() on fixed intervals

The confusion arose from mixing concepts between these modes.

Changes Made

None. Informational clarification only.

Original prompt

Help me understand what a "job" is in this codebase. Does a job run hourly? Or is a job each time a set of retrieval checks are done against all the SPs?


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Clarify definition of a job in the codebase No changes - informational request only Feb 6, 2026
Copilot AI requested a review from BigLep February 6, 2026 22:05
@BigLep BigLep changed the title No changes - informational request only [do not merge] No changes - informational request only Feb 6, 2026
Copilot AI changed the title [do not merge] No changes - informational request only No changes - informational request only Feb 6, 2026
Copilot AI changed the title No changes - informational request only No changes - clarified job scheduling architecture Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants