mirror of
https://github.com/inventree/InvenTree.git
synced 2026-10-05 18:01:14 +00:00
1 parent
432fd9b8e6
commit
9ec626b650
1 file changed
+4
@@ -68,6 +68,10 @@ def offload_task(taskname, *args, force_sync=False, **kwargs):
|
|||||||
import importlib
|
import importlib
|
||||||
from InvenTree.status import is_worker_running
|
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
|
if is_worker_running() and not force_sync: # pragma: no cover
|
||||||
# Running as asynchronous task
|
# Running as asynchronous task
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in new issue
Block a user