fix(jobs): a startup job should not report completion twice

Every startup job logged two info lines saying the same thing: the
scheduler engine's `job.run` (outcome + timing, which every dispatch
has always produced) and my `job.startup_completed` right after it.
Reading the boot log, that looks like the job ran twice.

Demoted to debug. The engine's line is the one that matters — logging
uniformly is the reason startup jobs go through `registry.trigger`
rather than calling handlers directly — and the `job.startup_trigger`
audit line before it already records that the startup path was the
caller, along with the flags it used.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Edouard Vanbelle
2026-08-30 16:42:39 +02:00
parent fb0925d10a
commit a7812475f4
+9 -1
View File
@@ -2912,7 +2912,15 @@ impl AppServiceFactory {
job.name,
);
match registry.trigger(&job.name, &job.args).await {
Some(outcome) => tracing::info!(
// Debug, not info. The engine already logs every
// dispatch as `job.run` with the outcome and timing —
// that is the point of routing through `trigger`
// rather than calling handlers directly. An info line
// here made every startup job report completion
// twice, from two layers, saying the same thing. The
// `job.startup_trigger` audit line above already
// records that the startup path was the caller.
Some(outcome) => tracing::debug!(
target: "oxicloud::scheduler",
event = "job.startup_completed",
job = %job.name,