Commit c1b34ad4 authored by 张永's avatar 张永

添加celery配置

parent 65d308ac
# !/usr/bin/env python
# encoding=utf-8
from __future__ import absolute_import
import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'sun.settings')
app = Celery('sun_tasks')
# Using a string here means the worker will not have to
# pickle the object when using Windows.
app.config_from_object('django.conf:settings')
app.autodiscover_tasks(lambda: settings.INSTALLED_APPS)
......@@ -7,7 +7,7 @@ from helios.rpc.exceptions import RPCFaultException
from utils.base import APIView
from utils.channel_package_tools import ChannelPackage
from utils.logger import error_logger
from utils.channel_task import version_release_task, channel_build, channel_build_one
from .tasks import version_release_task, channel_build, channel_build_one
def get_md5_value(src):
......
from .tasks import *
......@@ -16,4 +16,6 @@ git+ssh://git@git.wanmeizhensuo.com/alpha/alpha-types.git@master
filetype==1.0.2
Pillow==5.4.1
celery==4.2.1
requests==2.21.0
\ No newline at end of file
kombu==4.2.2.post1
requests==2.21.0
redis==2.10.6
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment