mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-08-01 13:27:43 +00:00
Handle locking correctly on throttle limit exceptions
This commit is contained in:
parent
0eba884fb1
commit
0c02518d1d
@ -326,9 +326,13 @@ class Job(CoreSysAttributes):
|
||||
|
||||
# Handle execution limits
|
||||
await self._handle_concurrency_control(job_group, job)
|
||||
try:
|
||||
if not await self._handle_throttling(group_name):
|
||||
self._release_concurrency_control(job_group)
|
||||
return # Job was throttled, exit early
|
||||
except Exception:
|
||||
self._release_concurrency_control(job_group)
|
||||
raise
|
||||
|
||||
# Execute Job
|
||||
with job.start():
|
||||
|
Loading…
x
Reference in New Issue
Block a user