mirror of
https://github.com/home-assistant/supervisor.git
synced 2026-10-09 23:49:00 +01:00
* Consume the exception of a finished detached job task With detach, errors raised by the job body surface on the returned task rather than to the caller. A caller that starts a detached job without awaiting the task, such as a scheduled reload starting the Supervisor auto update, would then leave an unretrieved exception that asyncio reports with a full traceback when the task is garbage collected. The wrapper has already captured the error on the job and logged it, so that report only adds noise. Retrieve the exception in the done callback the decorator already registers on every detached task. This only marks it as retrieved: callers that await the task still receive the exception. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * Log a consumed detached job failure A HassioError is only logged when it is raised with a logger, so consuming the exception of an unawaited detached task could leave a failure without any trace once the job record is cleaned up. Log one warning line naming the job. A JobException is skipped because the wrapper already logged it with its traceback. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>