Skip to content

feat(notifications): schedule the recap job on the cron with a configurable cadence knob #2248

Description

@JSONbored

The scheduling knob for #1963 ('config-driven cadence'): enqueue a maintainer-recap job from the scheduled() cron, gated on isRecapEnabled, following the exact enqueue idiom used for generate-weekly-value-report at src/index.ts:169 and ops-alerts at src/index.ts:161. Cadence (daily vs weekly, hour-of-day / day-of-week) read from an env knob with a safe default so the tick fires at most once per period.

Deliverables

  • Add the recap enqueue block in src/index.ts scheduled() gated on isRecapEnabled, using the existing isHourly / hour / getUTCDay guards (src/index.ts:169)
  • Parse a cadence env knob (e.g. GITTENSORY_RECAP_CADENCE=daily|weekly) with a documented default; clamp/validate like normalizeReportDays at src/services/weekly-value-report.ts:403
  • Unit test the cadence-selection helper: daily fires at the configured hour, weekly only on the configured day+hour, invalid value falls to default (all branches)

References

  • src/index.ts:161
  • src/index.ts:169
  • src/services/weekly-value-report.ts:403

Part of #1963.


size: S · held for later release (gittensor:feature once activated)

Metadata

Metadata

Assignees

No one assigned

    Labels

    gittensor:featureGittensor-scored feature linked to a feature issue — scores a 0.25x multiplier.gittensor:priorityMaintainer-selected Gittensor priority — scores a 1.5x multiplier.

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions