Phase 9, part 6: background work shared safely between copies of the app
internal/jobs keeps named locks as leases in the database (schema 31: locks, instances), taken with one conditional UPDATE on SQLite or Postgres, renewed while the work runs and lapsing if its copy stops. Each background loop's turn, sending an email, audits, discovery runs and imports run under a lock; OAuth sign-ins under way are kept in the database. Copies check in, and work marked running is recovered at start only when no other copy is alive. Settings -> About lists the copies and work under way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -805,3 +805,7 @@ Throughout, also notice:
|
||||
Postgres password, it says which and why.
|
||||
- [ ] After the update to schema 30, Settings → Backups shows the "before
|
||||
schema 30" backup, and `~/.local/share/supermarket/files` exists, empty.
|
||||
- [ ] Settings → About → Running lists one copy, "(this one)", seen just
|
||||
now. While an audit runs, `audit:<site>` shows under *Under way*.
|
||||
- [ ] Connecting a social account or Search Console still works (sign-ins
|
||||
under way are now kept in the database).
|
||||
|
||||
Reference in New Issue
Block a user