Skip to content
Merged
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 docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ services:
environment:
PORT: 11000
NODE_ENV: development
AUTH_JWT_SECRET: fkczyomvdprgvtmvkuhvprxuggkbgwld
AUTH_JWT_SECRET: ${CDN_AUTH_JWT_SECRET:-fkczyomvdprgvtmvkuhvprxuggkbgwld}
AUTH_ADMISSION_JWT_SECRET: uXDxJLEvrw4aafPfrf3rRotCoBzRfPEW
S3_STORAGE_URL: ${S3_STORAGE_URL:-http://${MINIO_ROOT_USER:-minio}:${MINIO_ROOT_PASSWORD:-changeme}@minio:9000/cosmo}
S3_REGION: ${S3_REGION_CDN:-${S3_REGION:-auto}}
Expand Down
6 changes: 3 additions & 3 deletions router/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func Main() {
)
}

watchFunc, err := watcher.New(watcher.Options{
w, err := watcher.New(watcher.Options{
Interval: result.Config.WatchConfig.Interval,
Logger: ll,
Paths: *configPathFlag,
Expand All @@ -203,9 +203,9 @@ func Main() {
// different instances of the router
time.Sleep(startupDelay)

if err := watchFunc(rootCtx); err != nil {
if err := w(rootCtx); err != nil {
if !errors.Is(err, context.Canceled) {
ll.Error("Error watching execution config", zap.Error(err))
ll.Error("Error watching router config", zap.Error(err))
} else {
ll.Debug("Watcher context cancelled, shutting down")
}
Expand Down
7 changes: 5 additions & 2 deletions router/core/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -1201,8 +1201,11 @@ func (r *Router) Start(ctx context.Context) error {

go func() {
if err := w(ctx); err != nil {
r.logger.Error("Error watching execution config", zap.Error(err))
return
if !errors.Is(err, context.Canceled) {
ll.Error("Error watching execution config", zap.Error(err))
} else {
ll.Debug("Watcher context cancelled, shutting down")
}
}
}()

Expand Down
7 changes: 4 additions & 3 deletions router/debug.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@

version: '1'

# execution_config:
# file:
# path: './__schemas/config.json'
execution_config:
file:
path: './__schemas/config.json'
watch: true

log_level: debug

Expand Down
Loading