當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。