{"action":"created","issue":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/2889","repository_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot","labels_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/2889/labels{/name}","comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/2889/comments","events_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/2889/events","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/2889","id":169808503,"number":2889,"title":"Some XP efficiency improvements","user":{"login":"douglascamata","id":159076,"avatar_url":"https://avatars.githubusercontent.com/u/159076?v=3","gravatar_id":"","url":"https://api.github.com/users/douglascamata","html_url":"https://github.com/douglascamata","followers_url":"https://api.github.com/users/douglascamata/followers","following_url":"https://api.github.com/users/douglascamata/following{/other_user}","gists_url":"https://api.github.com/users/douglascamata/gists{/gist_id}","starred_url":"https://api.github.com/users/douglascamata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douglascamata/subscriptions","organizations_url":"https://api.github.com/users/douglascamata/orgs","repos_url":"https://api.github.com/users/douglascamata/repos","events_url":"https://api.github.com/users/douglascamata/events{/privacy}","received_events_url":"https://api.github.com/users/douglascamata/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/labels/approved","name":"approved","color":"0052cc"},{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/labels/help%20to%20test%20please","name":"help to test please","color":"f9d0c4"},{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/labels/second%20review%20required","name":"second review required","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":47,"created_at":"2016-08-07T18:12:46Z","updated_at":"2016-08-08T15:45:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/2889","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/2889","diff_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/2889.diff","patch_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/2889.patch"},"body":"All this code was based on PR #2491 (thx a lot, @matheussampaio). \r\n\r\n## Run tasks in a time based way\r\n\r\n`BaseTask` now adds two helpers to every single task: `_update_last_ran` and `_time_to_run`. Both can be used in any task to ensure will only run from time to time and not in every single tick. Example:\r\n\r\n```python\r\ndef work(self):\r\n    if not self._time_to_run():\r\n        return False\r\n    self._update_last_ran()\r\n```\r\n\r\nThen if the task config someone like this can be used to customise the time interval (in seconds):\r\n\r\n```\r\n{\r\n    \"type\": \"TransferPokemon\",\r\n    \"config\": {\r\n        \"run_interval\": 60 \r\n     }\r\n}\r\n```\r\n\r\n## Added option in SpinFort and MoveToFort to run even without inventory space (because RecycleItem may be run only after more time)\r\n\r\n```\r\n{\r\n    \"type\": \"SpinFort\",\r\n    \"config\": {\r\n        \"ignore_item_count\": true\r\n    }\r\n},\r\n```\r\n\r\n## Exp result:\r\n\r\nI saw a bigger than 50% experience per hour increase in my bot. Everyone should see something similar unless in a bad place to bot or with poor configuration.\r\n\r\n`2016-08-07 19:59:34,083 [       cli] [INFO] Total XP Earned: 13540  Average: 66236.29/h`"},"comment":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/comments/238278979","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/2889#issuecomment-238278979","issue_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/2889","id":238278979,"user":{"login":"bibibkamal","id":20822427,"avatar_url":"https://avatars.githubusercontent.com/u/20822427?v=3","gravatar_id":"","url":"https://api.github.com/users/bibibkamal","html_url":"https://github.com/bibibkamal","followers_url":"https://api.github.com/users/bibibkamal/followers","following_url":"https://api.github.com/users/bibibkamal/following{/other_user}","gists_url":"https://api.github.com/users/bibibkamal/gists{/gist_id}","starred_url":"https://api.github.com/users/bibibkamal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bibibkamal/subscriptions","organizations_url":"https://api.github.com/users/bibibkamal/orgs","repos_url":"https://api.github.com/users/bibibkamal/repos","events_url":"https://api.github.com/users/bibibkamal/events{/privacy}","received_events_url":"https://api.github.com/users/bibibkamal/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T15:45:26Z","updated_at":"2016-08-08T15:45:26Z","body":"@w0rd3r i use the same config but only got like 50+k per h. Any help?"}}
{"actor":{"display_login":"bibibkamal"}}