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


Python SOAPProxy.getTrackerItemsFullByQueryId方法代码示例

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


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

示例1: github_label

# 需要导入模块: from SOAPpy import SOAPProxy [as 别名]
# 或者: from SOAPpy.SOAPProxy import getTrackerItemsFullByQueryId [as 别名]
        for e in full.extra_field_elements:
            # save for later lookup
            gforge_elements[e.element_id] = e.element_name
            # generate and cache github label for this extra data
            github_label(e.element_name)

        # create new tracker query to page through gracefully
        timestamp = datetime.now().strftime('%Y%m%d-%H%M%S')
        qid = GFapi.addTrackerQuery(GFsession, t.tracker_id, GFuserid, "GitHub Migration - %s" % timestamp, 0)

        # page through the new stored query, accumulate the results
        gforge_trackeritems = []
        offset = 0
        GFMAXRESULTS = 50
        while offset < t.item_total:
            items = GFapi.getTrackerItemsFullByQueryId(GFsession, qid, GFMAXRESULTS, offset)
            print "offset[%d] returned[%d] of total[%d]" % ( offset, len(items), t.item_total )
            gforge_trackeritems.extend(items)
            offset += len(items)
            
        # delete tracker query created for this migration
        result = GFapi.deleteTrackerQuery(GFsession, qid)

        # identify all historical users from tracker activity
        userstoadd = set()
        for i in gforge_trackeritems:
            # tracker item creator
            if i.submitted_by not in gforge_users:
                userstoadd.add(i.submitted_by)
            # all message authors
            for m in i.messages:
开发者ID:amedranogil,项目名称:gforge2github,代码行数:33,代码来源:gforge2github.py


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