fix: 注册dpm task
This commit is contained in:
parent
e95b7b73bc
commit
7f3da29560
|
@ -84,7 +84,7 @@ class CheckTaskSetCreateSerializer(CustomModelSerializer):
|
||||||
sch = validated_data["myschedule"]
|
sch = validated_data["myschedule"]
|
||||||
pobj = PeriodicTask()
|
pobj = PeriodicTask()
|
||||||
pobj.name = 'checktask_' + time.strftime('%Y%m%d%H%M%S')
|
pobj.name = 'checktask_' + time.strftime('%Y%m%d%H%M%S')
|
||||||
pobj.task = 'apps.dpm.dispath_checkwork_task'
|
pobj.task = 'apps.dpm.tasks.dispath_checkwork_task'
|
||||||
if sch.crontab:
|
if sch.crontab:
|
||||||
pobj.crontab = sch.crontab
|
pobj.crontab = sch.crontab
|
||||||
elif sch.interval:
|
elif sch.interval:
|
||||||
|
|
Loading…
Reference in New Issue