mirror of
https://github.com/esphome/esphome.git
synced 2025-10-23 12:13:49 +01:00
suggestions
This commit is contained in:
@@ -116,8 +116,7 @@ template<typename... Ts> class QueueingScript : public Script<Ts...>, public Com
|
||||
// max_runs_ is the maximum *total* instances (running + queued)
|
||||
// So we reject when num_queued_ + 1 >= max_runs_ (queued + running >= max)
|
||||
if (this->num_queued_ + 1 >= this->max_runs_) {
|
||||
this->esp_logw_(__LINE__,
|
||||
ESPHOME_LOG_FORMAT("Script '%s' maximum total instances (running + queued) exceeded!"),
|
||||
this->esp_logw_(__LINE__, ESPHOME_LOG_FORMAT("Script '%s' max instances (running + queued) reached!"),
|
||||
LOG_STR_ARG(this->name_));
|
||||
return;
|
||||
}
|
||||
|
@@ -31,9 +31,7 @@ async def test_script_queued(
|
||||
# Patterns for Test 1: Queue depth
|
||||
queue_start = re.compile(r"Queue test: START item (\d+)")
|
||||
queue_end = re.compile(r"Queue test: END item (\d+)")
|
||||
queue_reject = re.compile(
|
||||
r"Script 'queue_depth_script' maximum total instances \(running \+ queued\) exceeded!"
|
||||
)
|
||||
queue_reject = re.compile(r"Script 'queue_depth_script' max instances")
|
||||
|
||||
# Patterns for Test 2: Ring buffer
|
||||
ring_start = re.compile(r"Ring buffer: START '([A-Z])'")
|
||||
@@ -46,9 +44,7 @@ async def test_script_queued(
|
||||
# Patterns for Test 4: Rejection
|
||||
reject_start = re.compile(r"Rejection test: START (\d+)")
|
||||
reject_end = re.compile(r"Rejection test: END (\d+)")
|
||||
reject_reject = re.compile(
|
||||
r"Script 'rejection_script' maximum total instances \(running \+ queued\) exceeded!"
|
||||
)
|
||||
reject_reject = re.compile(r"Script 'rejection_script' max instances")
|
||||
|
||||
# Patterns for Test 5: No params
|
||||
no_params_end = re.compile(r"No params: END")
|
||||
|
Reference in New Issue
Block a user