Commit Graph
7 Commits
Author SHA1 Message Date
copilot-swe-agent[bot]andwhyour b33d994316 Re-register cron jobs when gRPC worker restarts
When the gRPC worker restarts, the scheduled tasks need to be re-added to the new gRPC server instance. This fix:

1. Tracks the HTTP worker reference in the master process
2. Sends a 'reregister-crons' message to the HTTP worker after gRPC restarts
3. HTTP worker calls autosave_crontab() to re-register all cron jobs with the new gRPC server

This ensures scheduled tasks continue to work after a gRPC worker restart.

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
2025-11-11 16:48:25 +00:00
copilot-swe-agent[bot]andwhyour 6ede8139ce Revert unnecessary pnpm-lock.yaml changes
The pnpm-lock.yaml was unintentionally updated when installing dependencies for testing. No package dependencies were actually changed - only existing code was modified in back/app.ts. Reverting to original state.

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
2025-11-11 16:33:12 +00:00
copilot-swe-agent[bot]andwhyour 95939bbea5 Improve logging accuracy for worker restarts
- Fixed log messages to accurately reflect worker state
- Added proper logging after gRPC worker is confirmed ready
- Improved HTTP worker restart logging with PID
- Addresses code review feedback for better clarity

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
2025-11-07 16:34:42 +00:00
copilot-swe-agent[bot]andwhyour 2baf352350 Refactor worker ready logic and improve restart handling
- Extracted waitForWorkerReady() method for better code reusability
- Improved worker restart logic to wait for gRPC worker readiness
- This addresses code review feedback for better maintainability

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
2025-11-07 16:32:11 +00:00
copilot-swe-agent[bot]andwhyour 827453986b Add timeout protection for gRPC worker initialization
Added 30-second timeout to prevent system hang if gRPC worker fails to start. This provides better error handling and prevents indefinite waiting.

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
2025-11-07 16:29:59 +00:00
copilot-swe-agent[bot]andwhyour 15f4bcf363 Fix race condition causing scheduled tasks not to run
Added synchronization to ensure gRPC worker is ready before HTTP worker starts. This prevents the race condition where autosave_crontab() tries to register cron jobs before the gRPC server is ready to accept them.

Co-authored-by: whyour <22700758+whyour@users.noreply.github.com>
2025-11-07 16:28:33 +00:00
copilot-swe-agent[bot] d8ea840266 Initial plan 2025-11-07 16:14:23 +00:00