mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
parent
432fd9b8e6
commit
9ec626b650
@ -68,6 +68,10 @@ def offload_task(taskname, *args, force_sync=False, **kwargs):
|
||||
import importlib
|
||||
from InvenTree.status import is_worker_running
|
||||
|
||||
# make sure the taskname is a string
|
||||
if not isinstance(taskname, str):
|
||||
taskname = str(taskname)
|
||||
|
||||
if is_worker_running() and not force_sync: # pragma: no cover
|
||||
# Running as asynchronous task
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user