You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jumpserver/apps/ops/tasks.py

14 lines
240 B

# coding: utf-8
from celery import shared_task
from django.core import serializers
def rerun_task():
pass
@shared_task
def run_task(tasks_json):
for task in serializers.deserialize('json', tasks_json):
task.object.run()