Improvements and fixes#15
Merged
Merged
Conversation
… and improved job restoration handling
…ersistence handling in Baker class
…xecution and time retrieval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces Cronbake v0.3.2, focusing on improved persistence, error handling, and developer experience. The documentation is significantly expanded and clarified, including new runnable TypeScript examples and guidance for both stateless and persistent job setups. The codebase adds opt-in persistence controls and methods to ensure job restoration is handled predictably, with user-defined jobs overriding restored state and improved metrics for failed executions.
Persistence & Restoration Improvements
persistflag), allowing only selected jobs to be saved/restored, and user-defined jobs replace restored jobs without conflict warnings. Metrics and history are hydrated during restore. [1]], [2]])baker.ready()method to await automatic restoration before interacting with jobs;autoStartnow waits for persistence to finish. Redundant persistence writes during restore are prevented for faster startups. [1]], [2]])Error Handling & Metrics
lastErrorreflect failures, andonErrorhandlers fire exactly once. ([CHANGELOG.mdR3-R18])baker.lastExecution()andCron.time()now match documented API: last actual run timestamp and remaining delay, not current epoch time. [1]], [2]])Documentation & Examples
examples/folder with runnable scripts for stateless and persistent job setups. [1]], [2]], [3]], [4]])API & Metadata Updates
chaqchase/cronbake. ([CHANGELOG.mdR3-R18])Developer Experience
Let me know if you want to walk through the new persistence workflow, or try out the example scripts locally!