celery为特定任务编写特定的日志文件

时间:2017-11-01 07:38:31

标签: django python-3.x celery django-celery

如何在django celery中为特定任务编写特定的日志文件,我在单个日志文件中写了整个芹菜日志 怎么做那个

from redington.celery import app
from celery import shared_task


@app.task(bind=True, name='load_ibm_machine_images')
def load_ibm_machine_images(self):
    """ Task to perform To load soft-layer machine images """
    from cloudapp.management.commands.update_softlayer_machine_types import Command
    soft_layer_command_object = Command()
    soft_layer_command_object.handle()
    return True

提前致谢!!!

0 个答案:

没有答案