| @@ -83,6 +83,7 @@ func newIndexerService() { | |||||
| Indexer.UpdateQueueLength = sec.Key("UPDATE_BUFFER_LEN").MustInt(20) | Indexer.UpdateQueueLength = sec.Key("UPDATE_BUFFER_LEN").MustInt(20) | ||||
| Indexer.MaxIndexerFileSize = sec.Key("MAX_FILE_SIZE").MustInt64(1024 * 1024) | Indexer.MaxIndexerFileSize = sec.Key("MAX_FILE_SIZE").MustInt64(1024 * 1024) | ||||
| Indexer.StartupTimeout = sec.Key("STARTUP_TIMEOUT").MustDuration(30 * time.Second) | Indexer.StartupTimeout = sec.Key("STARTUP_TIMEOUT").MustDuration(30 * time.Second) | ||||
| log.Info("New IndexerService Inited.") | |||||
| } | } | ||||
| // IndexerGlobFromString parses a comma separated list of patterns and returns a glob.Glob slice suited for repo indexing | // IndexerGlobFromString parses a comma separated list of patterns and returns a glob.Glob slice suited for repo indexing | ||||
| @@ -160,6 +160,7 @@ func NewQueueService() { | |||||
| if _, ok := sectionMap["LENGTH"]; !ok { | if _, ok := sectionMap["LENGTH"]; !ok { | ||||
| _, _ = section.NewKey("LENGTH", fmt.Sprintf("%d", Repository.PullRequestQueueLength)) | _, _ = section.NewKey("LENGTH", fmt.Sprintf("%d", Repository.PullRequestQueueLength)) | ||||
| } | } | ||||
| log.Info("New QueueService Inited.") | |||||
| } | } | ||||
| // ParseQueueConnStr parses a queue connection string | // ParseQueueConnStr parses a queue connection string | ||||
| @@ -48,4 +48,5 @@ func newWebhookService() { | |||||
| } | } | ||||
| } | } | ||||
| Webhook.ProxyHosts = sec.Key("PROXY_HOSTS").Strings(",") | Webhook.ProxyHosts = sec.Key("PROXY_HOSTS").Strings(",") | ||||
| log.Info("New WebhookService Inited.") | |||||
| } | } | ||||
| @@ -60,11 +60,17 @@ func NewServices() { | |||||
| if err := storage.Init(); err != nil { | if err := storage.Init(); err != nil { | ||||
| log.Fatal("storage init failed: %v", err) | log.Fatal("storage init failed: %v", err) | ||||
| } | } | ||||
| log.Info("storage init succeed.") | |||||
| mailer.NewContext() | mailer.NewContext() | ||||
| log.Info("mailer.NewContext() succeed.") | |||||
| _ = cache.NewContext() | _ = cache.NewContext() | ||||
| log.Info("cache.NewContext() succeed.") | |||||
| notification.NewContext() | notification.NewContext() | ||||
| log.Info("notification.NewContext() succeed.") | |||||
| decompression.NewContext() | decompression.NewContext() | ||||
| log.Info("decompression.NewContext() succeed.") | |||||
| labelmsg.Init() | labelmsg.Init() | ||||
| log.Info("labelmsg.Init() succeed.") | |||||
| } | } | ||||
| // In case of problems connecting to DB, retry connection. Eg, PGSQL in Docker Container on Synology | // In case of problems connecting to DB, retry connection. Eg, PGSQL in Docker Container on Synology | ||||