refactor: move API key cleanup job to actor (#1687)

This commit is contained in:
Alessandro (Ale) Segala
2026-08-15 00:39:02 +02:00
committed by GitHub
parent 6fba970159
commit 2dc062ac0f
12 changed files with 303 additions and 147 deletions
@@ -170,8 +170,12 @@ func initServices(
}
svc.apiKeyModule, err = apikey.New(ctx, apikey.Dependencies{
DB: db,
StaticApiKey: common.EnvConfig.StaticApiKey,
DB: db,
Actors: actors,
StaticApiKey: common.EnvConfig.StaticApiKey,
AppConfig: svc.appConfigService,
EmailSender: svc.emailModule,
CleanupDisabled: common.EnvConfig.AppEnv.IsTest(),
})
if err != nil {
return nil, fmt.Errorf("failed to create API key module: %w", err)