當前位置: 首頁>>代碼示例>>Python>>正文


Python WorkerCommand.execute_from_commandline方法代碼示例

本文整理匯總了Python中celery.bin.celeryd.WorkerCommand.execute_from_commandline方法的典型用法代碼示例。如果您正苦於以下問題:Python WorkerCommand.execute_from_commandline方法的具體用法?Python WorkerCommand.execute_from_commandline怎麽用?Python WorkerCommand.execute_from_commandline使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在celery.bin.celeryd.WorkerCommand的用法示例。


在下文中一共展示了WorkerCommand.execute_from_commandline方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: main

# 需要導入模塊: from celery.bin.celeryd import WorkerCommand [as 別名]
# 或者: from celery.bin.celeryd.WorkerCommand import execute_from_commandline [as 別名]
def main(argv=sys.argv): # pragma: no cover
    if len(argv) < 2:
        usage(argv)

    config_uri = argv[1]
    pcelery_setup(config_uri)

    worker = WorkerCommand(app=pyramid_celery.celery)
    worker.execute_from_commandline(argv=argv[1:])
開發者ID:xflash96,項目名稱:pyramid_celery,代碼行數:11,代碼來源:celeryd.py

示例2: main

# 需要導入模塊: from celery.bin.celeryd import WorkerCommand [as 別名]
# 或者: from celery.bin.celeryd.WorkerCommand import execute_from_commandline [as 別名]
def main():
    # 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 = WorkerCommand()
    worker.execute_from_commandline()
開發者ID:inercia,項目名稱:celery-worker-skel,代碼行數:12,代碼來源:command.py

示例3: test_setup_concurrency_very_early

# 需要導入模塊: from celery.bin.celeryd import WorkerCommand [as 別名]
# 或者: from celery.bin.celeryd.WorkerCommand import execute_from_commandline [as 別名]
 def test_setup_concurrency_very_early(self):
     x = WorkerCommand()
     x.run = Mock()
     with self.assertRaises(ImportError):
         x.execute_from_commandline(['celeryd', '-P', 'xyzybox'])
開發者ID:Crowdbooster,項目名稱:celery,代碼行數:7,代碼來源:test_celeryd.py

示例4: command

# 需要導入模塊: from celery.bin.celeryd import WorkerCommand [as 別名]
# 或者: from celery.bin.celeryd.WorkerCommand import execute_from_commandline [as 別名]
 def command(self):
     from celery.bin.celeryd import WorkerCommand
     w = WorkerCommand()
     w.execute_from_commandline(['celeryd'] + sys.argv[3:])
開發者ID:serchaos,項目名稱:openspending,代碼行數:6,代碼來源:__init__.py


注:本文中的celery.bin.celeryd.WorkerCommand.execute_from_commandline方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。