Public Member Functions | |
| None | __init__ (self, Callable[[ServiceCall], Coroutine[Any, Any, Any]] service_func, Callable[[ServiceCall], set[_T]] reload_targets_func) |
| None | execute_service (self, ServiceCall service_call) |
Private Attributes | |
| _reload_targets_func | |
| _service_condition | |
| _service_func | |
| _service_running | |
Helper for reload services. The helper has the following purposes: - Make sure reloads do not happen in parallel - Avoid redundant reloads of the same target
Definition at line 1190 of file service.py.
| None homeassistant.helpers.service.ReloadServiceHelper.__init__ | ( | self, | |
| Callable[[ServiceCall], Coroutine[Any, Any, Any]] | service_func, | ||
| Callable[[ServiceCall], set[_T]] | reload_targets_func | ||
| ) |
Initialize ReloadServiceHelper.
Definition at line 1198 of file service.py.
| None homeassistant.helpers.service.ReloadServiceHelper.execute_service | ( | self, | |
| ServiceCall | service_call | ||
| ) |
Execute the service. If a previous reload task is currently in progress, wait for it to finish first. Once the previous reload task has finished, one of the waiting tasks will be assigned to execute the reload of the targets it is assigned to reload. The other tasks will wait if they should reload the same target, otherwise they will wait for the next round.
Definition at line 1210 of file service.py.
|
private |
Definition at line 1208 of file service.py.
|
private |
Definition at line 1206 of file service.py.
|
private |
Definition at line 1204 of file service.py.
|
private |
Definition at line 1205 of file service.py.