Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/internal/bootstrap/jobs_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func registerJobs(appCtx context.Context, newScheduler *pkg_scheduler.JobSchedul
// Send initial heartbeat on startup without blocking bootstrap.
go analyticsJob.Run(appCtx)

eventCleanupJob := pkg_scheduler.NewEventCleanupJob(appServices.Event, appServices.Settings)
eventCleanupJob := pkg_scheduler.NewEventCleanupJob(appServices.Event, appServices.Activity, appServices.Settings)
newScheduler.RegisterJob(eventCleanupJob)

scheduledPruneJob := pkg_scheduler.NewScheduledPruneJob(appServices.System, appServices.Settings, appServices.Notification)
Expand Down
1 change: 1 addition & 0 deletions backend/internal/bootstrap/router_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ func setupRouter(ctx context.Context, cfg *config.Config, appServices *Services)
Font: appServices.Font,
Project: appServices.Project,
Event: appServices.Event,
Activity: appServices.Activity,
Version: appServices.Version,
Environment: appServices.Environment,
Settings: appServices.Settings,
Expand Down
10 changes: 6 additions & 4 deletions backend/internal/bootstrap/services_bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ type Services struct {
SystemUpgrade *services.SystemUpgradeService
Updater *services.UpdaterService
Event *services.EventService
Activity *services.ActivityService
Version *services.VersionService
Notification *services.NotificationService
Apprise *services.AppriseService //nolint:staticcheck // Apprise still functional, deprecated in favor of Shoutrrr
Expand All @@ -55,6 +56,7 @@ func initializeServices(ctx context.Context, db *database.DB, cfg *config.Config
svcs = &Services{}

svcs.Event = services.NewEventService(db, cfg, httpClient)
svcs.Activity = services.NewActivityService(db)
svcs.Settings, err = services.NewSettingsService(ctx, db)
if err != nil {
return nil, nil, fmt.Errorf("failed to settings service: %w", err)
Expand All @@ -76,8 +78,8 @@ func initializeServices(ctx context.Context, db *database.DB, cfg *config.Config
svcs.Version = services.NewVersionService(httpClient, cfg.UpdateCheckDisabled, config.Version, config.Revision, svcs.ContainerRegistry, svcs.Docker)
svcs.Notification = services.NewNotificationService(db, cfg, svcs.Environment)
svcs.Apprise = services.NewAppriseService(db, cfg)
svcs.Vulnerability = services.NewVulnerabilityService(db, svcs.Docker, svcs.Event, svcs.Settings, svcs.Notification)
svcs.ImageUpdate = services.NewImageUpdateService(db, svcs.Settings, svcs.ContainerRegistry, svcs.Docker, svcs.Event, svcs.Notification)
svcs.Vulnerability = services.NewVulnerabilityService(db, svcs.Docker, svcs.Event, svcs.Settings, svcs.Notification, svcs.Activity)
svcs.ImageUpdate = services.NewImageUpdateService(db, svcs.Settings, svcs.ContainerRegistry, svcs.Docker, svcs.Event, svcs.Notification, svcs.Activity)
svcs.Image = services.NewImageService(db, svcs.Docker, svcs.ContainerRegistry, svcs.ImageUpdate, svcs.Vulnerability, svcs.Event)
svcs.GitRepository = services.NewGitRepositoryService(db, cfg.GitWorkDir, svcs.Event, svcs.Settings)
svcs.Build = services.NewBuildService(db, svcs.Settings, svcs.Docker, svcs.ContainerRegistry, svcs.GitRepository, svcs.Event)
Expand All @@ -102,9 +104,9 @@ func initializeServices(ctx context.Context, db *database.DB, cfg *config.Config
svcs.Template = services.NewTemplateService(ctx, db, httpClient, svcs.Settings)
svcs.Auth = services.NewAuthService(svcs.User, svcs.Settings, svcs.Event, cfg.JWTSecret, cfg)
svcs.Oidc = services.NewOidcService(svcs.Auth, cfg, httpClient)
svcs.System = services.NewSystemService(db, svcs.Docker, svcs.Container, svcs.Image, svcs.Volume, svcs.Network, svcs.Settings)
svcs.System = services.NewSystemService(db, svcs.Docker, svcs.Container, svcs.Image, svcs.Volume, svcs.Network, svcs.Settings, svcs.Activity)
svcs.SystemUpgrade = services.NewSystemUpgradeService(svcs.Docker, svcs.Version, svcs.Event, svcs.Settings)
svcs.Updater = services.NewUpdaterService(db, svcs.Settings, svcs.Docker, svcs.Project, svcs.ImageUpdate, svcs.ContainerRegistry, svcs.Event, svcs.Image, svcs.Notification, svcs.SystemUpgrade)
svcs.Updater = services.NewUpdaterService(db, svcs.Settings, svcs.Docker, svcs.Project, svcs.ImageUpdate, svcs.ContainerRegistry, svcs.Event, svcs.Image, svcs.Notification, svcs.SystemUpgrade, svcs.Activity)
svcs.GitOpsSync = services.NewGitOpsSyncService(db, svcs.GitRepository, svcs.Project, svcs.Swarm, svcs.Event, svcs.Settings)
svcs.Webhook = services.NewWebhookService(db, svcs.Container, svcs.Updater, svcs.Project, svcs.GitOpsSync, svcs.Event)

Expand Down
8 changes: 0 additions & 8 deletions backend/internal/common/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -880,14 +880,6 @@ func (e *DockerInfoError) Error() string {
return fmt.Sprintf("Failed to get Docker info: %v", e.Err)
}

type SystemPruneError struct {
Err error
}

func (e *SystemPruneError) Error() string {
return fmt.Sprintf("Failed to prune resources: %v", e.Err)
}

type ContainerStartAllError struct {
Err error
}
Expand Down
2 changes: 2 additions & 0 deletions backend/internal/configschema/schema_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ var expectedEnvConfigVars = []string{

var expectedSettingOverrideKeys = []string{
"accentColor",
"activityHistoryMaxEntries",
"activityHistoryRetentionDays",
"applicationTheme",
"authLocalEnabled",
"authOidcConfig",
Expand Down
Loading
Loading