clean up logs, delete cached data when atproto account is deleted

This commit is contained in:
Evan Jarrett
2025-12-31 12:21:17 -06:00
parent f19dfa2716
commit 1df1bb57a4
9 changed files with 236 additions and 76 deletions
+1 -5
View File
@@ -165,11 +165,7 @@ func serveRegistry(cmd *cobra.Command, args []string) error {
go func() {
// Wait for services to be ready (Docker startup race condition)
time.Sleep(10 * time.Second)
// Create service token getter callback that uses auth.GetOrFetchServiceToken
getServiceToken := func(ctx context.Context, userDID, holdDID, pdsEndpoint string) (string, error) {
return auth.GetOrFetchServiceToken(ctx, refresher, userDID, holdDID, pdsEndpoint)
}
if err := db.MigrateStatsToHolds(context.Background(), uiDatabase, getServiceToken); err != nil {
if err := db.MigrateStatsToHolds(context.Background(), uiDatabase); err != nil {
slog.Warn("Stats migration failed", "error", err)
}
}()