Skip to content

chore: Allow overriding Contract Subscription cron #882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 24, 2025
Merged

Conversation

arcoraven
Copy link
Contributor

@arcoraven arcoraven commented Apr 24, 2025

PR-Codex overview

This PR focuses on updating the cron scheduling implementation in the codebase by replacing the node-cron package with the cron package. It also introduces new environment variable configurations for cron schedules.

Detailed summary

  • Added cron package dependency.
  • Removed node-cron package dependency.
  • Updated type definitions from cron.ScheduledTask to CronJob.
  • Refactored scheduling logic in clear-cache-cron.ts and chain-indexer-listener.ts to use the new CronJob class.
  • Introduced a new environment variable CONTRACT_SUBSCRIPTION_CRON_SCHEDULE_OVERRIDE.
  • Updated INDEXER_REGISTRY to store CronJob instances.
  • Simplified the createScheduleSeconds function to accept only blockTimeSeconds.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

zeet-co bot commented Apr 24, 2025

We're building your pull request over on Zeet.
Click me for more info about your build and deployment.
Once built, this branch can be tested at: https://tw-unreal-demo-engine-vwn0-ph-cro-e4e17b.engine-aws-usw2.zeet.app before merging 😉

Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​luxon@​3.6.21001007687100
Addedcron@​4.3.010010010097100

View full report

@arcoraven arcoraven merged commit 60ff122 into main Apr 24, 2025
7 checks passed
@arcoraven arcoraven deleted the ph/cron-override branch April 24, 2025 14:22
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