dvlyadmin_pro/backend/apps/lycrontab/views/celery_clocked_schedule.py
2025-03-17 18:06:54 +08:00

33 lines
1.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/python
#coding: utf-8
# +-------------------------------------------------------------------
# | system: django-vue-lyadmin
# +-------------------------------------------------------------------
# | Author: lybbn
# +-------------------------------------------------------------------
# | QQ: 1042594286
# +-------------------------------------------------------------------
# ------------------------------
# django_celery_beat ClockedSchedule view
# ------------------------------
from django_celery_beat.models import ClockedSchedule
from utils.serializers import CustomModelSerializer
from utils.viewset import CustomModelViewSet
class ClockedScheduleSerializer(CustomModelSerializer):
class Meta:
model = ClockedSchedule
read_only_fields = ["id"]
fields = '__all__'
class ClockedScheduleModelViewSet(CustomModelViewSet):
"""
时钟时间DateTimeField运行一次性任务
"""
queryset = ClockedSchedule.objects.all()
serializer_class = ClockedScheduleSerializer