~sirn/fanboi2

ref: 834edf0edc5dd633c0ecea16231b6ed2d728476d fanboi2/fanboi2/cmd/celery.py -rw-r--r-- 348 bytes
834edf0eKridsada Thanabulpong Massive cleanup in preparation for 0.30 (#25) 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import sys

from celery.bin.celery import main as celery_main

from .. import settings_from_env, setup_logger, make_config


def main(argv=sys.argv):
    """Run Celery with application environment."""
    settings = settings_from_env()
    setup_logger(settings)
    config = make_config(settings)
    config.make_wsgi_app()

    celery_main(argv)