# Path: pyvac/config.py
# def configure(filename='conf/pyvac.yaml', init_celery=True, default_app=None):
#     with open(filename) as fdesc:
#         conf = yaml.load(fdesc, YAMLLoader)
#     if conf.get('logging'):
#         dictConfig(conf.get('logging'))
# 
#     if init_celery:
#         if not default_app:
#             try:
#                 from celery import current_app as default_app
#             except ImportError:  # pragma: no cover
#                 from celery.app import default_app
# 
#         default_app.config_from_object(conf.get('celeryconfig'))
#         # XXX: must call loader for celery to register all the tasks
#         default_app.loader.import_default_modules()
# 
#     return conf


import sys
    from celery import Celery
    from celery.app import default_app
    from celery.bin.worker import worker as BaseWorkerCommand # noqa
    from celery.bin.celeryd import WorkerCommand as BaseWorkerCommand
from pyvac.config import configure
    from celery.concurrency.processes.forking import freeze_support
#!/usr/bin/python
#-*- coding: utf-8 -*-


try:
    default_app = Celery()
except ImportError:  # pragma: no cover

try:
except ImportError:  # pragma: no cover



class CommandMixin(object):
    preload_options = []

    def setup_app_from_commandline(self, argv):
        if len(argv) < 2:
            print('No configuration file specified.', file=sys.stderr)
            sys.exit(1)


# Path: pyvac/config.py
# def configure(filename='conf/pyvac.yaml', init_celery=True, default_app=None):
#     with open(filename) as fdesc:
#         conf = yaml.load(fdesc, YAMLLoader)
#     if conf.get('logging'):
#         dictConfig(conf.get('logging'))
# 
#     if init_celery:
#         if not default_app:
#             try:
#                 from celery import current_app as default_app
#             except ImportError:  # pragma: no cover
#                 from celery.app import default_app
# 
#         default_app.config_from_object(conf.get('celeryconfig'))
#         # XXX: must call loader for celery to register all the tasks
#         default_app.loader.import_default_modules()
# 
#     return conf


# Path: pyvac/bin/celerycmd.py
import sys
    from celery import Celery
    from celery.app import default_app
    from celery.bin.worker import worker as BaseWorkerCommand # noqa
    from celery.bin.celeryd import WorkerCommand as BaseWorkerCommand
from pyvac.config import configure
    from celery.concurrency.processes.forking import freeze_support

#!/usr/bin/python
#-*- coding: utf-8 -*-


try:
    default_app = Celery()
except ImportError:  # pragma: no cover

try:
except ImportError:  # pragma: no cover



class CommandMixin(object):
    preload_options = []

    def setup_app_from_commandline(self, argv):
        if len(argv) < 2:
            print('No configuration file specified.', file=sys.stderr)
            sys.exit(1)


        configure(sys.argv[1], default_app=default_app)