fix: add recheck loop to stop-failure hook for suspend/resume awareness #11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "guochao/agent-run:master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Previously the hook used a single thread::sleep for the full duration,
which pauses during system suspend. The process would fail to wake up
on time because sleep time does not advance while suspended.
Replace with a recheck loop that sleeps in short intervals (default
30s, configurable via --recheck-interval-seconds) and uses
SystemTime (wall clock) to detect when the target deadline has
arrived. If wall-clock drift between checks exceeds 60s, log a
warning about possible suspend/resume.