{"action":"opened","issue":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/5408","repository_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot","labels_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/5408/labels{/name}","comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/5408/comments","events_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/5408/events","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/issues/5408","id":176377007,"number":5408,"title":"Refresh rate object on map (more pokemon after fix now)","user":{"login":"beershophops","id":22137387,"avatar_url":"https://avatars.githubusercontent.com/u/22137387?v=3","gravatar_id":"","url":"https://api.github.com/users/beershophops","html_url":"https://github.com/beershophops","followers_url":"https://api.github.com/users/beershophops/followers","following_url":"https://api.github.com/users/beershophops/following{/other_user}","gists_url":"https://api.github.com/users/beershophops/gists{/gist_id}","starred_url":"https://api.github.com/users/beershophops/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beershophops/subscriptions","organizations_url":"https://api.github.com/users/beershophops/orgs","repos_url":"https://api.github.com/users/beershophops/repos","events_url":"https://api.github.com/users/beershophops/events{/privacy}","received_events_url":"https://api.github.com/users/beershophops/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-12T13:35:56Z","updated_at":"2016-09-12T13:35:56Z","closed_at":null,"body":"Hello, \r\n\r\ni were suggesting that refresh is set on one sec. but niantic's set on ten secs (info on web)\r\nif refresh is under ten secs, niantic maybe return empty array\r\n\r\nmy fix is:\r\n\r\nthis on PokemonGoBot constructor\r\n```Python\r\ndef __init__(self, db, config):\r\n   ...\r\n   self.last_update_cell = time.time()\r\n```\r\n\r\nand this in PokemonGoBot.get_meta_cell method\r\n\r\n```Python\r\ndef get_meta_cell(self):\r\n   if self.cell and time.time() - self.last_update_cell < 10:\r\n      # print \"too early\"\r\n      return self.cell\r\n   # print \"update cells\"\r\n   self.last_update_cell = time.time()\r\n   ...\r\n```\r\n\r\nafter fix, i started to catch more pokemon ^^\r\n"}}
{"actor":{"display_login":"beershophops"}}