refactor: complete graceful shutdown implementation and add service runner (#493)

This commit is contained in:
Alessandro (Ale) Segala
2025-05-03 14:25:22 -07:00
committed by GitHub
parent 6bd6cefaa6
commit bda178c2bb
13 changed files with 454 additions and 130 deletions

View File

@@ -26,12 +26,12 @@ type AppConfigService struct {
db *gorm.DB
}
func NewAppConfigService(ctx context.Context, db *gorm.DB) *AppConfigService {
func NewAppConfigService(initCtx context.Context, db *gorm.DB) *AppConfigService {
service := &AppConfigService{
db: db,
}
err := service.LoadDbConfig(ctx)
err := service.LoadDbConfig(initCtx)
if err != nil {
log.Fatalf("Failed to initialize app config service: %v", err)
}