Commit 2d4d255
committed
device_server: pass options to DeviceServer to enable logging (#180)
When the multiprocessing start method is not fork (Windows only has
spawn, and macOS defaults to spawn), then configuration done in the
main process is not copied to the child process, i.e., the actual
device process. This means that the logging level set on the main
process is not inherited by the DeviceServer process.
This commit passes the device server options to the DeviceServer so
that it can redo the required logging configuration on the new
process. It does this by passing all options since we expect to
expand those.
This commit also adds dependency on the dataclasses module which means
being dependent on Python 3.7 (which is now almost 3 years old).1 parent fea16e0 commit 2d4d255
File tree
6 files changed
+66
-13
lines changed- microscope
- testsuite
6 files changed
+66
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
187 | 201 | | |
188 | 202 | | |
189 | 203 | | |
| |||
228 | 242 | | |
229 | 243 | | |
230 | 244 | | |
| 245 | + | |
231 | 246 | | |
232 | 247 | | |
233 | 248 | | |
| |||
239 | 254 | | |
240 | 255 | | |
241 | 256 | | |
| 257 | + | |
242 | 258 | | |
243 | 259 | | |
244 | 260 | | |
245 | 261 | | |
246 | 262 | | |
247 | 263 | | |
| 264 | + | |
248 | 265 | | |
249 | 266 | | |
250 | 267 | | |
| |||
262 | 279 | | |
263 | 280 | | |
264 | 281 | | |
| 282 | + | |
265 | 283 | | |
266 | 284 | | |
267 | 285 | | |
| |||
283 | 301 | | |
284 | 302 | | |
285 | 303 | | |
| 304 | + | |
| 305 | + | |
286 | 306 | | |
287 | 307 | | |
288 | 308 | | |
| |||
369 | 389 | | |
370 | 390 | | |
371 | 391 | | |
372 | | - | |
| 392 | + | |
373 | 393 | | |
374 | 394 | | |
375 | 395 | | |
| |||
443 | 463 | | |
444 | 464 | | |
445 | 465 | | |
446 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
447 | 471 | | |
448 | 472 | | |
449 | 473 | | |
| |||
517 | 541 | | |
518 | 542 | | |
519 | 543 | | |
520 | | - | |
| 544 | + | |
521 | 545 | | |
522 | 546 | | |
523 | 547 | | |
| |||
534 | 558 | | |
535 | 559 | | |
536 | 560 | | |
537 | | - | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
538 | 566 | | |
539 | 567 | | |
540 | 568 | | |
| |||
557 | 585 | | |
558 | 586 | | |
559 | 587 | | |
560 | | - | |
| 588 | + | |
561 | 589 | | |
562 | 590 | | |
563 | | - | |
| 591 | + | |
564 | 592 | | |
565 | 593 | | |
566 | 594 | | |
567 | 595 | | |
568 | 596 | | |
569 | 597 | | |
570 | 598 | | |
571 | | - | |
| 599 | + | |
572 | 600 | | |
573 | | - | |
| 601 | + | |
574 | 602 | | |
575 | 603 | | |
576 | 604 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
112 | 115 | | |
113 | | - | |
| 116 | + | |
| 117 | + | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
| |||
266 | 270 | | |
267 | 271 | | |
268 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
269 | 276 | | |
270 | 277 | | |
271 | 278 | | |
| |||
295 | 302 | | |
296 | 303 | | |
297 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
298 | 308 | | |
299 | 309 | | |
300 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
102 | 111 | | |
103 | 112 | | |
104 | 113 | | |
105 | | - | |
| 114 | + | |
106 | 115 | | |
107 | 116 | | |
108 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | | - | |
| 189 | + | |
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| |||
0 commit comments