mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 16:05:42 +00:00
fix: treat concurrent_limit/timeout <= 0 as unset instead of a zero cap (#10288)
* fix: treat concurrent_limit/timeout <= 0 as unset instead of a zero cap Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix: flow-step timeout <= 0 inherits the script timeout, not the global default Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
68daed8501
commit
8eb36ce008
@@ -914,6 +914,13 @@ async fn create_script_internal<'c>(
|
||||
}
|
||||
check_scopes(&authed, || format!("scripts:write:{}", ns.path))?;
|
||||
|
||||
// Normalize positive-only settings so a `<= 0` value (e.g. a CLI-pushed `0`) persists as
|
||||
// disabled rather than as a zero-slot concurrency cap or a 0-second timeout. Deserialization
|
||||
// already normalizes the concurrency fields; re-applying here also covers `timeout` and any
|
||||
// NewScript built in-process rather than from a request body.
|
||||
ns.timeout = windmill_common::runnable_settings::none_if_non_positive(ns.timeout);
|
||||
ns.concurrency_settings = ns.concurrency_settings.normalized();
|
||||
|
||||
guard_script_from_debounce_data(&ns).await?;
|
||||
|
||||
let codebase = ns.codebase.as_ref();
|
||||
|
||||
Reference in New Issue
Block a user