mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
fix(agent): isolate web and storage blocking I/O
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import asyncio
|
||||
import inspect
|
||||
import json
|
||||
import threading
|
||||
from abc import ABCMeta, abstractmethod
|
||||
@@ -646,7 +647,9 @@ class MoviePilotTool(BaseTool, metaclass=ABCMeta):
|
||||
self._channel == NotificationChannel.WebAgent.value
|
||||
and callable(callback)
|
||||
):
|
||||
callback(message)
|
||||
callback_result = callback(message)
|
||||
if inspect.isawaitable(callback_result):
|
||||
await callback_result
|
||||
return
|
||||
|
||||
if not self._channel or not self._source:
|
||||
|
||||
Reference in New Issue
Block a user