Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Refresh rate object on map (catch more pokemon) #5409

Closed
b4p3p opened this issue Sep 12, 2016 · 3 comments
Closed

Fix Refresh rate object on map (catch more pokemon) #5409

b4p3p opened this issue Sep 12, 2016 · 3 comments

Comments

@b4p3p
Copy link

b4p3p commented Sep 12, 2016

Hello,

i were suggesting that refresh is set on one sec. but niantic's set on ten secs (info on web)
if refresh is under ten secs, niantic maybe return empty array

my fix is:

this on PokemonGoBot constructor

def __init__(self, db, config):
   ...
   self.last_update_cell = time.time()

and this in PokemonGoBot.get_meta_cell method

def get_meta_cell(self):
   if self.cell and time.time() - self.last_update_cell < 10:
      # print "too early"
      return self.cell
   # print "update cells"
   self.last_update_cell = time.time()
   ...

after fix, i started to catch more pokemon ^^

@b4p3p
Copy link
Author

b4p3p commented Sep 12, 2016

sorry, 🙅

can i edit this value?

map_object_cache_time = 10

@julienlavergne
Copy link
Contributor

Yes you can

@Gobberwart
Copy link
Contributor

Closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants