当前位置: 首页>>代码示例>>Python>>正文


Python BuildApp.pool_size方法代码示例

本文整理汇总了Python中libgiza.app.BuildApp.pool_size方法的典型用法代码示例。如果您正苦于以下问题:Python BuildApp.pool_size方法的具体用法?Python BuildApp.pool_size怎么用?Python BuildApp.pool_size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在libgiza.app.BuildApp的用法示例。


在下文中一共展示了BuildApp.pool_size方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: mine

# 需要导入模块: from libgiza.app import BuildApp [as 别名]
# 或者: from libgiza.app.BuildApp import pool_size [as 别名]
def mine(args):
    conf = fetch_config(args)
    app = BuildApp(conf)
    app.pool_size = 4

    gh = get_connection(conf)

    pprint(mine_github_pulls(gh, app, conf))
开发者ID:fviolette,项目名称:docs-tools,代码行数:10,代码来源:github.py

示例2: test_add_existing_app_object

# 需要导入模块: from libgiza.app import BuildApp [as 别名]
# 或者: from libgiza.app.BuildApp import pool_size [as 别名]
 def test_add_existing_app_object(self):
     self.assertEqual(self.app.queue, [])
     app = BuildApp()
     app.pool_size = 2
     self.app.add(app)
     self.assertIs(app, self.app.queue[0])
     self.assertIsNot(app, BuildApp())
     self.assertIsNot(BuildApp(), self.app.queue[0])
开发者ID:i80and,项目名称:libgiza,代码行数:10,代码来源:test_app.py

示例3: progress

# 需要导入模块: from libgiza.app import BuildApp [as 别名]
# 或者: from libgiza.app.BuildApp import pool_size [as 别名]
def progress(args):
    conf = fetch_config(args)
    app = BuildApp(conf)
    app.pool = 'thread'
    app.pool_size = 2

    j = JeerahClient(conf)
    j.connect()

    query_data = giza.jeerah.progress.query(j, app, conf)

    pprint(giza.jeerah.progress.report(query_data, conf))
开发者ID:mbrukman,项目名称:mongodb-docs-tools,代码行数:14,代码来源:scrumpy.py

示例4: actions

# 需要导入模块: from libgiza.app import BuildApp [as 别名]
# 或者: from libgiza.app.BuildApp import pool_size [as 别名]
def actions(args):
    conf = fetch_config(args)
    app = BuildApp(conf)
    app.pool_size = 4
    gh = get_connection(conf)

    results = []

    for pull in mine_github_pulls(gh, app, conf):
        if pull['merge_safe'] is True:
            results.append(pull)

    pprint(results)
开发者ID:fviolette,项目名称:docs-tools,代码行数:15,代码来源:github.py

示例5: test_single_runner_app

# 需要导入模块: from libgiza.app import BuildApp [as 别名]
# 或者: from libgiza.app.BuildApp import pool_size [as 别名]
    def test_single_runner_app(self):
        self.assertEqual(self.app.queue, [])
        self.assertEqual(self.app.results, [])

        app = BuildApp()
        app.pool_size = 2
        t = app.add('task')
        t.job = sum
        t.args = [[1, 2], 0]
        t.description = 'test task'

        self.app.add(app)
        self.app.run()
        self.assertEqual(self.app.results[0], 3)
开发者ID:i80and,项目名称:libgiza,代码行数:16,代码来源:test_app.py

示例6: test_single_runner_app_with_many_subtasks

# 需要导入模块: from libgiza.app import BuildApp [as 别名]
# 或者: from libgiza.app.BuildApp import pool_size [as 别名]
    def test_single_runner_app_with_many_subtasks(self):
        self.assertEqual(self.app.queue, [])
        self.assertEqual(self.app.results, [])

        app = BuildApp()
        app.pool_size = 2

        for _ in range(10):
            t = app.add('task')
            t.job = sum
            t.description = 'test task'
            t.args = [[1, 2], 0]

        self.app.add(app)
        self.app.run()
        self.assertEqual(len(self.app.results), 10)
        self.assertEqual(self.app.results[0], 3)
        self.assertEqual(sum(self.app.results), 30)
开发者ID:i80and,项目名称:libgiza,代码行数:20,代码来源:test_app.py

示例7: stats

# 需要导入模块: from libgiza.app import BuildApp [as 别名]
# 或者: from libgiza.app.BuildApp import pool_size [as 别名]
def stats(args):
    conf = fetch_config(args)
    app = BuildApp(conf)
    app.pool_size = 4
    gh = get_connection(conf)

    users = set()
    result = {'merge_safe': 0, 'total': 0}
    for pull in mine_github_pulls(gh, app, conf):
        result['total'] += 1
        if pull['merge_safe'] is True:
            result['merge_safe'] += 1

        users.add(pull['user'])

    result['user_count'] = len(users)
    result['users'] = list(users)

    pprint(result)
开发者ID:fviolette,项目名称:docs-tools,代码行数:21,代码来源:github.py


注:本文中的libgiza.app.BuildApp.pool_size方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。