Skip to content
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

Fix multi cron #4

Merged
merged 2 commits into from
Dec 22, 2023
Merged

Fix multi cron #4

merged 2 commits into from
Dec 22, 2023

Conversation

rsromanowski
Copy link
Contributor

@rsromanowski rsromanowski commented Oct 25, 2023

Context

Setting up multiple cron jobs would allow both to run, but you could only reference the first one declared. The reason for this is subsequent calls to app.state('cron'...) (which occur in .use(cron(...)) would not overwrite cron in the app

  • See commit af83c2c for reproducing tests

Changes

  • Upgrade to elysia 0.7.0 to get access to remap functionality
  • Update cron method to use remap instead of setting state directly

@rsromanowski
Copy link
Contributor Author

Fixes #3

@SaltyAom SaltyAom merged commit 89cd904 into elysiajs:main Dec 22, 2023
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