~sirn/fanboi2

ref: 6713af3bca6247f57cb9b84ed0856713c56067d8 fanboi2/fanboi2/scripts/celery.py -rw-r--r-- 383 bytes
6713af3bKridsada Thanabulpong Raise minimum body character requirement to 5 characters. 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import os
import sys
from fanboi2.tasks import celery
from pyramid.paster import bootstrap


def main(argv=sys.argv):
    if not len(argv) >= 2:
        sys.stderr.write("Usage: %s config\n" % os.path.basename(argv[0]))
        sys.stderr.write("Configuration file not present.\n")
        sys.exit(1)

    bootstrap(argv[1])
    celery.start(argv[:1] + argv[2:])  # Remove argv[1].