use nats-js cache

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2023-12-13 12:48:27 +01:00
parent b4d1feea5f
commit 003310a2b0
7 changed files with 21 additions and 11 deletions
+4 -2
View File
@@ -64,6 +64,8 @@ import (
var (
// runset keeps track of which services to start supervised.
runset map[string]struct{}
// time to wait after starting the preliminary services
_preliminaryDelay = 6 * time.Second
// time to wait between starting service groups (preliminary, main, delayed)
_startDelay = 2 * time.Second
)
@@ -413,8 +415,8 @@ func Start(o ...Option) error {
// trap will block on halt channel for interruptions.
go trap(s, halt)
// grace period for supervisor to get up
time.Sleep(_startDelay)
// grace period for preliminary services to get up
time.Sleep(_preliminaryDelay)
// schedule services that we are sure don't have interdependencies.
scheduleServiceTokens(s, s.ServicesRegistry)