Skip to content

v0.6.2: Cron result delivery fix, Windows upgrade fix

Choose a tag to compare

@PleasePrompto PleasePrompto released this 26 Feb 06:07
· 329 commits to main since this release

ductor v0.6.2

Fixes cron job results not being delivered to Telegram, and Windows upgrade PermissionError.

Cron result delivery fix

Cron job results were silently dropped under two conditions:

  1. Race condition: Result delivery happened AFTER update_run_status() wrote to cron_jobs.json. The file-watcher could detect the change, trigger a reschedule, and cancel the running task — before the Telegram message was sent. Results are now delivered before the file write.
  2. Deleted job guard: if self._on_result and job: silently dropped results when get_job() returned None (e.g., after a manager reload). Removed the job dependency — delivery now uses the title captured at execution start.
  3. Unhandled exceptions: _run_at only caught CancelledError, so any unexpected exception in _execute_job silently lost the result and prevented rescheduling. Now catches and logs all exceptions.

4 new tests verify these scenarios.

Windows upgrade pipeline fix

pipx upgrade fails on Windows with PermissionError because the running bot process locks ductor.exe.

  • Windows: Uses pipx runpip instead of pipx upgrade to upgrade inside the venv without touching the locked global exe.
  • Always verify version: Checks installed version after upgrade regardless of exit code — pipx may report failure from exe lock while the package is actually upgraded.
  • CDN propagation hint: When pip can't find the pinned version, shows a user-friendly message instead of raw pip error.

Upgrade

ductor upgrade
# or
pip install --upgrade ductor