factory/apps/system/tasks.py

13 lines
308 B
Python
Executable File

# Create your tasks here
from __future__ import absolute_import, unicode_literals
from random import random, randint
from apps.utils.task import CustomTask
from celery import shared_task
from django.core.mail import send_mail
@shared_task(base=CustomTask)
def show():
x = randint(0, 5)
print(40/x)