Commit 5acf147
committed
Fix ConfigManagingActor to handle missing config files gracefully
Eliminate recursive actor crashes when config files are missing.
The previous implementation suffered from a critical error pattern:
- The `_read_config` method is called at the start of the `_run` method
- When no config files existed, an exception would be raised
- This exception caused the actor to crash and immediately restart
- Restarting triggered the same `_read_config` method
- The cycle repeated, creating a persistent crash loop
This fix introduces a more robust approach:
- Detect missing config files without throwing exceptions
- Set up a FileWatcher to monitor for future config file creation
- call `_read_config` method as soon as any config file is crated.
Signed-off-by: Elzbieta Kotulska <[email protected]>1 parent 003ac25 commit 5acf147
1 file changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 115 | | |
119 | 116 | | |
120 | 117 | | |
| |||
138 | 135 | | |
139 | 136 | | |
140 | 137 | | |
141 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
0 commit comments