Commit b38823b
committed
fix(sync): guard empty project list in watch loop
When constrained_project names a project not in the DB, or every active
project is filtered out by cloud-mode rules, _select_projects_to_watch()
returns []. watchfiles.awatch() raises ValueError on an empty path list,
which the outer handler catches with a 5-second sleep — producing a
tight error-log loop until a project appears.
Addresses review feedback on #759: sleep 30 s and retry instead, giving
the project list time to populate (e.g. after the user adds a project).
Logs include the constrained_project value so misconfiguration is easy
to diagnose.
Signed-off-by: phernandez <paul@basicmachines.co>1 parent 5b95504 commit b38823b
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
214 | 229 | | |
215 | 230 | | |
216 | 231 | | |
| |||
0 commit comments