Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

        def main(app=None):
    # Fix for setuptools generated scripts, so that it will
    # work with multiprocessing fork emulation.
    # (see multiprocessing.forking.get_preparation_data())
    if __name__ != '__main__':  # pragma: no cover
        sys.modules['__main__'] = sys.modules[__name__]
    from billiard import freeze_support
    freeze_support()
    worker(app=app).execute_from_commandline()
        


src/c/e/celery-3.1.11/celery/__main__.py   celery(Download)
def _compat_worker():
    maybe_patch_concurrency()
    _warn_deprecated('celery worker')
    from celery.bin.worker import main
    main()

src/c/e/celery-HEAD/celery/__main__.py   celery(Download)
def _compat_worker():
    maybe_patch_concurrency()
    _warn_deprecated('celery worker')
    from celery.bin.worker import main
    main()

src/c/e/celery-3.1.11/celery/tests/bin/test_worker.py   celery(Download)
from celery.app import trace
from celery.apps import worker as cd
from celery.bin.worker import worker, main as worker_main
from celery.exceptions import (
    ImproperlyConfigured, WorkerShutdown, WorkerTerminate,
    def test_main(self):
        p, cd.Worker = cd.Worker, Worker
        s, sys.argv = sys.argv, ['worker', '--discard']
        try:
            worker_main(app=self.app)

src/c/e/celery-HEAD/celery/tests/bin/test_worker.py   celery(Download)
from celery.app import trace
from celery.apps import worker as cd
from celery.bin.worker import worker, main as worker_main
from celery.exceptions import (
    ImproperlyConfigured, WorkerShutdown, WorkerTerminate,
    def test_main(self):
        p, cd.Worker = cd.Worker, Worker
        s, sys.argv = sys.argv, ['worker', '--discard']
        try:
            worker_main(app=self.app)