Repository navigation
Commit 058fa6d
Make the poll loop crash-proof + log heartbeat
Likely root cause of "not executing": a single uncaught exception in the heartbeat
coroutine (scan or notify) would terminate the whole launch coroutine, permanently
stopping the 5s poll — so only "服务启动" appeared and never a poll line.
Now each iteration wraps scan and notify in try/catch (a transient error can no
longer kill polling), logs "心跳循环已启动" on start, and logs any scan/notify
exception with the iteration number — so the activity log distinguishes loop-not-
running vs scan-hanging vs scan-throwing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0a8d14e commit 058fa6d
1 file changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | | - | |
119 | | - | |
120 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
121 | 133 | | |
122 | 134 | | |
| 135 | + | |
123 | 136 | | |
124 | 137 | | |
125 | 138 | | |
| |||
0 commit comments