mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix run_async
This commit is contained in:
+1
-1
@@ -461,7 +461,7 @@ class Scheduler(metaclass=Singleton):
|
|||||||
if not func:
|
if not func:
|
||||||
return
|
return
|
||||||
if inspect.iscoroutinefunction(func):
|
if inspect.iscoroutinefunction(func):
|
||||||
AsyncUtils.run_async_in_executor(func(*args, **kwargs))
|
AsyncUtils.run_async(func(*args, **kwargs))
|
||||||
else:
|
else:
|
||||||
job["func"](*args, **kwargs)
|
job["func"](*args, **kwargs)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user