Commit d1d4986
committed
fix: handle SIGTERM and SIGINT gracefully for clean shutdown
Use asyncio signal handlers for both SIGTERM (systemd stop) and SIGINT
(Ctrl+C), logging the signal name and cancelling all tasks to go through
the normal cleanup path instead of exiting with code 143.1 parent 259da26 commit d1d4986
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
151 | 152 | | |
152 | 153 | | |
153 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
154 | 165 | | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
155 | 170 | | |
156 | 171 | | |
157 | 172 | | |
| |||
204 | 219 | | |
205 | 220 | | |
206 | 221 | | |
207 | | - | |
208 | | - | |
| 222 | + | |
0 commit comments