• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rm-hull / fuel-prices-api / 22042684139

15 Feb 2026 08:39PM UTC coverage: 0.0%. Remained the same
22042684139

push

github

web-flow
feat: add background cron jobs for data sync (#5)

Introduces a background task scheduler using `robfig/cron` to automate
data synchronization, replacing manual polling logic.

*   Added `internal/cron.go` to manage scheduled updates.
*   **Filling Stations**: Synchronized every 6 hours.
*   **Fuel Prices**: Synchronized every hour.
*   Integrates the scheduler into the `ApiServer` startup sequence.

```mermaid
sequenceDiagram
    participant S as API Server
    participant C as Cron Manager
    participant E as External API
    participant R as Repository

    S->>C: StartCron(client, repo)
    Note over C: Scheduler Starts
    par Every 6 Hours
        C->>E: GetFillingStations()
        E->>R: InsertPFS()
    and Every 1 Hour
        C->>E: GetFuelPrices()
        E->>R: InsertPrices()
    end
```

0 of 31 new or added lines in 2 files covered. (0.0%)

0 of 602 relevant lines covered (0.0%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/cmd/api_server.go


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc