From 735ba1e977d6e74679d3d322ee8036f14be17707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Mon, 12 Sep 2022 19:35:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=BC=80=E5=90=AF=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E6=97=B6=E4=BF=9D=E8=AF=81=E5=8F=AF=E4=BB=A5=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/opm/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/opm/services.py b/apps/opm/services.py index 591741a3..0459ddeb 100644 --- a/apps/opm/services.py +++ b/apps/opm/services.py @@ -1,4 +1,5 @@ +import time from apps.ecm.service import check_not_in_place from apps.ecm.tasks import opl_task from apps.opm.models import Operation, Opl, OplWorker @@ -100,6 +101,7 @@ def start_mtask(opl: Opl): vc_codes = list(op.vchannels.all().values_list('code', flat=True)) opl_id = opl.id task = opl_task.delay(vc_codes, opl_id) + time.sleep(3) opl.mtask = TaskResult.objects.get(task_id=task.task_id) opl.save()