当前位置: 首页>>代码示例>>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;未经允许,请勿转载。