| Index | Recent Threads | Unanswered Threads | Who's Active | Guidelines | Search |
| World Community Grid Forums
|
| No member browsing this thread |
|
Thread Status: Active Total posts in this thread: 18
|
|
| Author |
|
|
adriverhoef
Master Cruncher The Netherlands Joined: Apr 3, 2009 Post Count: 2346 Status: Offline Project Badges:
|
Kevin, hopefully you are looking at the good thing now. :-)
----------------------------------------Here's what I'm using: ${HTTPS}www.worldcommunitygrid.org/api/members/<membername>/results?code=<code>&format=json&ServerState=5&SortBy=CpuTime&Offset=0&Limit=0 It is currently returning 0 results, as lavaflow mentioned, although there are results available. This is what I get: {"ResultsStatus": {I think 'Limit=0' was never official. Can it officially be used from now on (as soon as it works again )?EDIT: To retrieve the maximum number of results allowed, of course. [Edit 2 times, last edit by adriverhoef at Jan 23, 2020 1:19:05 AM] |
||
|
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Anyone interested in retrieving zero records;?
----------------------------------------Come to think of it, though 0 is enormously helpful to just one-pass pull everything, like entering limit=1048575, since my spreadsheet will take only 1 more (reserved for the table header), the 0 return still tells how many records there are to fetch in the loop. Think 1,000 is already a big improvement over 250, not to speak of the default of 25 if nothing is specified or something is wrong, the 'wrong' now also giving 0. [Edit 1 times, last edit by Former Member at Jan 22, 2020 1:51:41 PM] |
||
|
|
adriverhoef
Master Cruncher The Netherlands Joined: Apr 3, 2009 Post Count: 2346 Status: Offline Project Badges:
|
What about trying to retrieve a negative number of records?
Well, at least it works! That is, you'll get all — to the maximum extent permitted — available results:{"ResultsStatus": {… is what I get when using limit=-1. |
||
|
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Lol, like some of the BOINC cc_config options. I'll try that in a mom.
----------------------------------------Edit: OFLMBO, it works. Superb out-of-the-box find. [Edit 2 times, last edit by Former Member at Jan 22, 2020 5:43:59 PM] |
||
|
|
knreed
Former World Community Grid Tech Joined: Nov 8, 2004 Post Count: 4504 Status: Offline Project Badges:
|
I found the behavior. In hibernate, when "setMaxResults" is called with a 0 or negative number, the behavior is not defined. In the older version of hibernate setting it to 0 would return all results. In the new version, 0 returns 0 results. As you observed a negative value will also return all results.
However, there is discussion that they might make it an error to call the function with 0 or lower. In order to preserve the behavior and make limit=0 official, I've modified the code so that if limit is 0 or less, then setMaxResults is not set and therefore all results will be returned. This code will be on production in the next 30 minutes or so. I'll post when it is available. |
||
|
|
knreed
Former World Community Grid Tech Joined: Nov 8, 2004 Post Count: 4504 Status: Offline Project Badges:
|
This change has been deployed. limit=0 will work as it previously did (but now for the right reasons rather than a quirk of the underlying library).
|
||
|
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
Many thanks for the arduous labor. 😎
|
||
|
|
Former Member
Cruncher Joined: May 22, 2018 Post Count: 0 Status: Offline |
This change has been deployed. There's 'This change' and am asking about 'That change' of upping the record limit to 500 or 1000 per fetch request. Just tried today with 500 but good old 250 keeps coming back. As for features, it would be great if only the records can be pulled after a certain <ModTime> timestamp. That would reduce the number of records to fetch to probably a quarter to just those that had a transaction in the last 12 hours i.e. the duration of a statistics period. Thanks for your attention. |
||
|
|
|