Skip to content

fix(data-processing): fix scheduler and models syntax errors#1009

Open
olalois wants to merge 7 commits into
Pulsefy:mainfrom
olalois:fix/syntax-onchain-scheduler
Open

fix(data-processing): fix scheduler and models syntax errors#1009
olalois wants to merge 7 commits into
Pulsefy:mainfrom
olalois:fix/syntax-onchain-scheduler

Conversation

@olalois

@olalois olalois commented Jul 2, 2026

Copy link
Copy Markdown

Fixes two syntax errors that caused CI to fail:

  • Close the add_job call for the on-chain KPI snapshot and make the metadata drift job a separate, well-formed add_job (fixes SyntaxError in apps/data-processing/src/scheduler.py).
  • Add OnchainKpiSnapshot.repr inside its class and remove the stray misplaced repr (fixes E999 syntax error in apps/data-processing/src/db/models.py).

Closes #877

olalois added 2 commits June 28, 2026 21:47
…#877)

- Add OnchainKpiSnapshot SQLAlchemy model (TVL, volume, active rounds,
  contribution count, extra_data, captured_at)
- Add save_onchain_kpi_snapshot (duplicate-skip) and
  get_onchain_kpi_snapshots to PostgresService
- Add Alembic migration 006 with unique constraint on period_date
- Add src/snapshots/onchain_kpi_snapshot.py: _fetch_kpis fetches from
  Stellar Horizon + DB; run_onchain_kpi_snapshot_job is the job entry point
- Register job daily at 00:05 UTC in AnalyticsScheduler
- Add 9 unit tests (all passing)

Closes Pulsefy#877
@Cedarich

Cedarich commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Please resolve conflicts

olalois added 2 commits July 2, 2026 23:08
…ency-path

This PR fixes the data-processing CI workflow by adding `cache-dependency-path: requirements.txt` to `actions/setup-python@v5`.

Closes Pulsefy#988
@Cedarich

Cedarich commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@olalois

@olalois
olalois force-pushed the fix/syntax-onchain-scheduler branch from afcc0da to 43dce2b Compare July 13, 2026 07:49
olalois added 2 commits July 13, 2026 08:03
Resolved conflicts:
- .github/workflows/contract-drift.yml: kept HEAD (modify/delete)
- apps/backend/src/grants/grants-leaderboard.service.spec.ts: accepted upstream contributorPublicKey rename
- apps/data-processing/src/db/models.py: kept both OnchainKpiSnapshot + MetadataDriftFinding
- apps/data-processing/src/db/postgres_service.py: imported both models, kept all methods
- apps/data-processing/src/scheduler.py: kept both imports + onchain_kpi_snapshot_daily job
@olalois

olalois commented Jul 13, 2026

Copy link
Copy Markdown
Author

@Cedarich please review

@Cedarich

Copy link
Copy Markdown
Contributor

@olalois

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.

Data-processing: Daily on-chain KPI snapshot scheduler

2 participants