Skip to content

Commit

Permalink
Log only if there are loaded plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Nov 21, 2023
1 parent 3632a09 commit fea549b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,6 @@ var runCmd = &cobra.Command{
// TODO: Move this to the plugin registry.
ctx, span := otel.Tracer(config.TracerName).Start(runCtx, "Plugin health check")

logger.Info().Str(
"healthCheckPeriod", conf.Plugin.HealthCheckPeriod.String(),
).Msg("Starting plugin health check scheduler")
// Ping the plugins to check if they are alive, and remove them if they are not.
startDelay := time.Now().Add(conf.Plugin.HealthCheckPeriod)
if _, err := healthCheckScheduler.Every(
Expand Down Expand Up @@ -337,6 +334,9 @@ var runCmd = &cobra.Command{
span.RecordError(err)
}
if pluginRegistry.Size() > 0 {
logger.Info().Str(
"healthCheckPeriod", conf.Plugin.HealthCheckPeriod.String(),
).Msg("Starting plugin health check scheduler")
healthCheckScheduler.StartAsync()
}

Expand Down

0 comments on commit fea549b

Please sign in to comment.