Commit fbd23bf
authored
Some daemon code cleanup (#4341)
* Move GcLogger to its own file; fixes #4194
* Rationalize and document exceptions raised by receive().
* Various changes to dmypy
- Move do_restart() and wait_for_server() right after do_start()
- Introduce BadStatus exception, use instead of SystemExit
- Add a timeout option to request(), use for stop/status
- Include all socket ops in the try/except clause
- Misc cleanup
* Make status quiet by default
- Use status -v for the old behavior
- replace -q flags with -v flags
- Change the way command line arg parsers are updated (for easier copying)
- If 'error' in response, sys.exit with that message
- Make timeout a genuine keyword arg
- Other minor cleanups
* Record stats when keeping a tree in memory (bypassing the queue)
* Update docstring for write_cache()
* Clean up exception handling. Refactor do_restart() to call do_stop() and shared code with do_start()
* Improve request() docstring
* More tweaks
- Add docstring to BadStatus (so I won't have to explain it elsewhere)
- Get rid of "except Exception" altogether, simplifying things quite a bit
- Add a few clarifying comments when BadStatus is caught (or not)
- Fix signature of @action()1 parent 5f8aaf6 commit fbd23bf
5 files changed
Lines changed: 227 additions & 167 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1156 | 1156 | | |
1157 | 1157 | | |
1158 | 1158 | | |
| 1159 | + | |
1159 | 1160 | | |
1160 | 1161 | | |
| 1162 | + | |
| 1163 | + | |
1161 | 1164 | | |
1162 | 1165 | | |
1163 | 1166 | | |
| |||
2268 | 2271 | | |
2269 | 2272 | | |
2270 | 2273 | | |
2271 | | - | |
| 2274 | + | |
| 2275 | + | |
| 2276 | + | |
2272 | 2277 | | |
2273 | 2278 | | |
2274 | 2279 | | |
| |||
0 commit comments