more tracing around scheduled jobs

This commit is contained in:
Ruben Fiszel
2024-02-11 23:26:06 +01:00
parent 4b096ccab5
commit 82d7dfdfdb
2 changed files with 10 additions and 2 deletions
+8
View File
@@ -969,6 +969,7 @@ pub async fn handle_maybe_scheduled_job<'c, R: rsmq_async::RsmqConnection + Clon
script_path: &str,
w_id: &str,
) -> windmill_common::error::Result<QueueTransaction<'c, R>> {
tracing::info!("Schedule {schedule_path} scheduling next job for {script_path} in {w_id}",);
let schedule = get_schedule_opt(tx.transaction_mut(), w_id, schedule_path).await?;
if schedule.is_none() {
@@ -1031,6 +1032,13 @@ pub async fn handle_maybe_scheduled_job<'c, R: rsmq_async::RsmqConnection + Clon
}
}
} else {
if script_path != schedule.script_path {
tracing::warn!(
"Schedule {schedule_path} in {w_id} has a different script path than the job. Not scheduling again"
);
} else {
tracing::info!("Schedule {schedule_path} in {w_id} is disabled. Not scheduling again.");
}
Ok(tx)
}
}
+2 -2
View File
@@ -704,7 +704,7 @@ const command = new Command()
)
.action(run as any)
.command("bootstrap", "create a new script")
.arguments("<path:string> <language:string>")
.arguments("<path:file> <language:string>")
.option("--summary <summary:string>", "script summary")
.option("--description <description:string>", "script description")
.action(bootstrap as any)
@@ -712,7 +712,7 @@ const command = new Command()
"generate-metadata",
"re-generate the metadata file updating the lock and the script schema"
)
.arguments("[script:string]")
.arguments("[script:file]")
.option("--yes", "Skip confirmation prompt")
.option("--lock-only", "re-generate only the lock")
.option("--schema-only", "re-generate only script schema")