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
|
# Handle execution limits
|
||||||
await self._handle_concurrency_control(job_group, job)
|
await self._handle_concurrency_control(job_group, job)
|
||||||
if not await self._handle_throttling(group_name):
|
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)
|
self._release_concurrency_control(job_group)
|
||||||
return # Job was throttled, exit early
|
raise
|
||||||
|
|
||||||
# Execute Job
|
# Execute Job
|
||||||
with job.start():
|
with job.start():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user