Improve cron workflow robustness and diagnostics#283
Merged
tbrandenburg merged 1 commit intomainfrom Mar 14, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Motivation
Description
max_instances=1and addingmisfire_grace_time=300to reduce missed or overlapping runs and make behavior predictable.shellScriptPath, or missing script files to aid immediate diagnosis.lastStartedAt,lastFinishedAt,lastDurationMs,lastExitCode,lastError,nextRunAt, andrunningby introducingget_cron_job_diagnosticsand backing fields (_last_finished_by_job,_last_duration_ms_by_job,_last_exit_code_by_job,_last_error_by_job).get_cron_job_diagnostics()intolist_workspace_workflowsso UI/clients can display runtime status alongsidelastRun.failedJobsSinceStartupcounter toget_cron_clock_statusand ensured runtime diagnostics maps are cleared on clock start.Testing
uv run --project packages/pybackend python -m pytest packages/pybackend/tests/unit/test_cron_service.py packages/pybackend/tests/unit/test_workflow_service.py packages/pybackend/tests/unit/test_api.pywhich executed the test suite and all tests passed (109 passed, 1 warning).Codex Task