简体   繁体   English

在 Komodo ide 中使用 Pyral 包

[英]Using Pyral package with Komodo ide

I'm using Python, write down in Komodo IDE, to create toolkit that works with CA agile central API service(Rally) - Rally for Developer .我正在使用 Python(在 Komodo IDE 中写下)来创建与 CA 敏捷中央 API 服务(Rally)- Rally for Developer一起使用的工具包。 When using GET HTTP request, I encounter with several problems:使用GET HTTP请求时,遇到几个问题:

1. Fetching partial records - if I set FETCH property == True not all records return. 1. 获取部分记录- 如果我设置 FETCH 属性 == True 并非所有记录都返回。 On the other hand, if I set FETCH with specific value/s from the query(eg, FETCH = 'FormattedID'), the instance fetch all the records.另一方面,如果我使用查询中的特定值设置 FETCH(例如,FETCH = 'FormattedID'),则该实例将获取所有记录。 This is my GET request:这是我的 GET 请求:

> rallyApiObjectModels = rally.get('HierarchicalRequirement',
> projectScopeDown = True, project="myProject", fetch=True,
> order="FormattedID", start=1, pagesize = 500);

And than:然后:

 for _objModel in rallyApiObjectModels.data["Result"]
            print(_objModel)

2. Low performance using Komodo ide - when trying to fetch data from the HTTP request that is greater than 200, it takes for the end of time(eg, pagesize =300 takes 11 min). 2. 使用 Komodo ide 的低性能- 当试图从 HTTP 请求中获取大于 200 的数据时,需要时间结束(例如,pagesize =300 需要 11 分钟)。 On the other hand, using command promp is very fast for the same script when writing to file.另一方面,在写入文件时,对于相同的脚本,使用命令提示符非常快。 I set the same rally.get request like above and just print to IDE console:我设置了与上面相同的rally.get请求,然后打印到IDE控制台:

print rallyApiObjectModels.data["Result"]

Any ideas?有任何想法吗?

Please don't use fetch=true.请不要使用 fetch=true。 The performance is terrible, as you found.正如你发现的那样,表现很糟糕。 It is much better to specify exactly the fields you want included in the response.准确指定要包含在响应中的字段要好得多。 You should be able to use a page size of up to 2000, with the performance sweet spot being some balance between the set of fields fetched and your network latency.您应该能够使用最大 2000 的页面大小,性能最佳点是获取的字段集和网络延迟之间的某种平衡。

I bet the Komodo IDE is just choking on the large response- unfortunately there's not much that can be done about that on the Rally end...我敢打赌,Komodo IDE 只是因为巨大的响应而窒息 - 不幸的是,在拉力赛结束时对此无能为力......

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM