mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-03 22:08:49 +00:00
parent
432fd9b8e6
commit
9ec626b650
@ -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:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user