Commit 5d13bb4
authored
fix(sync): stop firing a full Atlas sync on every message (#61)
getSession() rebuilt the session object with only api_key/user_id/
device_name, dropping cached_v and last_check_ts. refreshIfStale() reads
both, so its TTL gate and version dedupe were dead code: every CLI
invocation and every processor iteration fired a /api/cli/sync/version
probe plus a full background /api/cli/sync, each rewriting synced-env
and session files. updateSession (getSession + spread + save) also
erased whichever bookkeeping field it wasn't patching.
Carry the two fields through getSession so the 10s probe TTL and the
version dedupe work as designed.1 parent 4a0bd75 commit 5d13bb4
2 files changed
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
308 | 314 | | |
309 | 315 | | |
310 | 316 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments