From b0fe60a5c96c5d840e446ca10cbb0a68766b43cb Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Thu, 10 Jul 2025 14:06:49 +0200 Subject: [PATCH] Fix THROTTLE_WAIT behavior The concurrency QUEUE does not really QUEUE throttle limits. --- supervisor/jobs/decorator.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/supervisor/jobs/decorator.py b/supervisor/jobs/decorator.py index 9e9911a91..2f5a9c507 100644 --- a/supervisor/jobs/decorator.py +++ b/supervisor/jobs/decorator.py @@ -522,18 +522,8 @@ class Job(CoreSysAttributes): time_since_last_call = datetime.now() - self.last_call(group_name) throttle_period = self.throttle_period(group_name) if time_since_last_call < throttle_period: - # If we have queue concurrency (WAIT behavior), sleep until throttle period passes - if self.concurrency in ( - JobConcurrency.QUEUE, - JobConcurrency.GROUP_QUEUE, - ): - sleep_time = ( - throttle_period - time_since_last_call - ).total_seconds() - await asyncio.sleep(sleep_time) - else: - # For non-queue concurrency (REJECT behavior), just return False - return False + # Always return False when throttled (skip execution) + return False elif self.throttle in (JobThrottle.RATE_LIMIT, JobThrottle.GROUP_RATE_LIMIT): # Only reprocess array when necessary (at limit) if len(self.rate_limited_calls(group_name)) >= self.throttle_max_calls: