×
To be able to write in the forum you need to authenticate. Meanwhile it's read-only.
GetOldestCaches issue
GetOldestCaches issue August 04, 2021 02:00PM |
Registered: 6 years ago Posts: 636 |
There appears to be an issue using GetOldestCaches when there is a minHiddenDate set in the filter. When it is set the following error appears:
Example of working code can be seen here:https://project-gc.com/Challenges//62414
Non-working code is https://project-gc.com/Challenges//62415
The working code uses
I started going down this road as an alternative to using GetNumCachesInArea to create a jasmer checker that will automatically notice missing months. Like GetNumCachesInArea the country required limitation will prevent a worldwide version. It still would be nice to specify for a single region so we do not need to manually update checkers as caches get archived.
Error 8, lua_callbacks.php:1525 Undefined variable: minHiddenDate
Example of working code can be seen here:https://project-gc.com/Challenges//62414
Non-working code is https://project-gc.com/Challenges//62415
The working code uses
testfilter={} testfilter.country="United States" testfilter.excludeArchived=true mycs=PGC.GetOldestCaches({filter=testfilter,limit=1})The non working code uses:
testfilter={} testfilter.country="United States" testfilter.excludeArchived=true testfilter.minHiddenDate="1970-01-01" mycs=PGC.GetOldestCaches({filter=testfilter,limit=1})
I started going down this road as an alternative to using GetNumCachesInArea to create a jasmer checker that will automatically notice missing months. Like GetNumCachesInArea the country required limitation will prevent a worldwide version. It still would be nice to specify for a single region so we do not need to manually update checkers as caches get archived.
Re: GetOldestCaches issue August 05, 2021 03:35PM |
Admin Registered: 6 years ago Posts: 751 |
Re: GetOldestCaches issue August 05, 2021 03:35PM |
Admin Registered: 6 years ago Posts: 751 |
Re: GetOldestCaches issue August 05, 2021 05:07PM |
Registered: 6 years ago Posts: 636 |
Re: GetOldestCaches issue August 06, 2021 07:57AM |
Admin Registered: 6 years ago Posts: 751 |
I have now released the code. Not tested, but it was very minor changes so I am quite confident it will work.
I didn't really get this part. I interpret it as you wish me to change something. If so, please explain again.
I didn't really get this part. I interpret it as you wish me to change something. If so, please explain again.
Quote
I started going down this road as an alternative to using GetNumCachesInArea to create a jasmer checker that will automatically notice missing months. Like GetNumCachesInArea the country required limitation will prevent a worldwide version. It still would be nice to specify for a single region so we do not need to manually update checkers as caches get archived.
Re: GetOldestCaches issue August 06, 2021 10:58AM |
Registered: 6 years ago Posts: 636 |
Let me experiment further with using this to make an "adaptive jasmer" for filters where some months are missing or a small number of caches away from missing. A virtual jasmer is such an example: Find a virtual cache in each month since the start of caching that has a virtual cache. Or a Large Jasmer is also such an example. Also regional checkers like https://project-gc.com/Challenges/GC2WMPX/23571 may require manual tweaking in the future.
Currently a world wide versions would be difficult as this call and the GetNumInArea both require a country. To do a full jasmer would require that both calls work fast enough to support a number of countries times number of months calls in under the time limit. GetNumInArea is too slow at this time to support something like one call per month since the start of geocaching.
Frankly my preference would be a faster worldwide GetNumInArea without a country requirement than this call. The nice thing about GetNumInArea being faster and without a country requirement would be that it would allow tailoring to a Jasmer to require months with only some number of caches remaining in the month and not require manual intervations as caches archive. So based on a current single jasmer 4 caches in a month may be set as the required threshhold.
So this is an observation that a further request could be coming shortly based on how experimentation progresses.
Currently a world wide versions would be difficult as this call and the GetNumInArea both require a country. To do a full jasmer would require that both calls work fast enough to support a number of countries times number of months calls in under the time limit. GetNumInArea is too slow at this time to support something like one call per month since the start of geocaching.
Frankly my preference would be a faster worldwide GetNumInArea without a country requirement than this call. The nice thing about GetNumInArea being faster and without a country requirement would be that it would allow tailoring to a Jasmer to require months with only some number of caches remaining in the month and not require manual intervations as caches archive. So based on a current single jasmer 4 caches in a month may be set as the required threshhold.
So this is an observation that a further request could be coming shortly based on how experimentation progresses.
Re: GetOldestCaches issue August 06, 2021 11:13PM |
Registered: 6 years ago Posts: 636 |
This is the sort of checker I am experimenting with. There are certainly optimizations to be made to this one to reduce the number of calls but the functionality is basically there.
https://project-gc.com/Challenges//62459
https://project-gc.com/Challenges//62459
Re: GetOldestCaches issue August 11, 2021 04:03PM |
Registered: 6 years ago Posts: 636 |
So I have been kicking the tired on this version of GetOldestCaches. It appears to work generally ok.
Sometimes it does appear to return more caches than the limit. Functionally this does not seem to matter for me. However I am moderately concerned this has a performance impact.
A sample script is here https://project-gc.com/Challenges//62550
Thanks
Sometimes it does appear to return more caches than the limit. Functionally this does not seem to matter for me. However I am moderately concerned this has a performance impact.
A sample script is here https://project-gc.com/Challenges//62550
Thanks
Sorry, you do not have permission to post/reply in this forum.