Phase 13, part 5: each team's jobs, locks, files and sign-ins
Background jobs run for each active team on its own Server and under its own locks, a few teams at a time and from a different team each round, so the work is shared between copies of the app and no team holds up another. Each team's files are under its own prefix, and an OAuth sign-in comes back only to the team that started it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -411,7 +411,7 @@ func (s *Server) RunAccounts(ctx context.Context) {
|
||||
tick := time.NewTicker(time.Hour)
|
||||
defer tick.Stop()
|
||||
for {
|
||||
s.jobDo(ctx, "accounts", func(context.Context) {
|
||||
s.jobDo(ctx, "accounts", func(_ context.Context, s *Server) {
|
||||
now := time.Now()
|
||||
if _, err := users.PruneSessions(s.DB, now); err != nil {
|
||||
s.Log.Warn("accounts: pruning sessions", "err", err)
|
||||
|
||||
Reference in New Issue
Block a user