{"action":"created","comment":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/comments/75645826","id":75645826,"diff_hunk":"@@ -91,25 +152,34 @@ def work(self):\n         worker_result = WorkerResult.SUCCESS\n         if self.should_run():\n \n-            if not (self.max_balls_keep is None):\n-                worker_result = self.recycle_excess_category_max(self.max_balls_keep, [1,2,3,4])\n-            if not (self.max_potions_keep is None):\n-                worker_result = self.recycle_excess_category_max(self.max_potions_keep, [101,102,103,104])\n-            if not (self.max_berries_keep is None):\n-                worker_result = self.recycle_excess_category_max(self.max_berries_keep, [701,702,703,704,705])\n-            if not (self.max_revives_keep is None):\n-                worker_result = self.recycle_excess_category_max(self.max_revives_keep, [201,202])\n-\n-            inventory.refresh_inventory()\n-\n             for item_in_inventory in inventory.items().all():\n-\n                 if self.item_should_be_recycled(item_in_inventory):\n                     # Make the bot appears more human\n                     action_delay(self.recycle_wait_min, self.recycle_wait_max)\n                     # If at any recycling process call we got an error, we consider that the result of this task is error too.\n                     if ItemRecycler(self.bot, item_in_inventory, self.get_amount_to_recycle(item_in_inventory)).work() == WorkerResult.ERROR:\n                         worker_result = WorkerResult.ERROR\n+\n+            if not (self.max_balls_keep is None):\n+                this_worker_result = self.recycle_excess_category_max(self.max_balls_keep, [1,2,3,4])\n+                if this_worker_result <> WorkerResult.SUCCESS:\n+                    worker_result = this_worker_result","path":"pokemongo_bot/cell_workers/recycle_items.py","position":110,"original_position":110,"commit_id":"80acac7f24b3cbc71c2f6dd77aff009df47b4976","original_commit_id":"80acac7f24b3cbc71c2f6dd77aff009df47b4976","user":{"login":"BriceSD","id":9154952,"avatar_url":"https://avatars.githubusercontent.com/u/9154952?v=3","gravatar_id":"","url":"https://api.github.com/users/BriceSD","html_url":"https://github.com/BriceSD","followers_url":"https://api.github.com/users/BriceSD/followers","following_url":"https://api.github.com/users/BriceSD/following{/other_user}","gists_url":"https://api.github.com/users/BriceSD/gists{/gist_id}","starred_url":"https://api.github.com/users/BriceSD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BriceSD/subscriptions","organizations_url":"https://api.github.com/users/BriceSD/orgs","repos_url":"https://api.github.com/users/BriceSD/repos","events_url":"https://api.github.com/users/BriceSD/events{/privacy}","received_events_url":"https://api.github.com/users/BriceSD/received_events","type":"User","site_admin":false},"body":"If the first returns error and the second running, what do we keep ? Looks like running, while we want to return error. For now we want to return error if one of them returns error. That’s it. Don’t make it harder than it needs to be with some boolean complementation.\r\n\r\nOne or two weeks ago we had no error state. This bot is moving fast, you can’t predict what will be the fourth state, thus you can’t predict if it should override the error state or not.\r\nDon’t make it harder to spot bugs when something has changed somewhere else.","created_at":"2016-08-22T09:31:31Z","updated_at":"2016-08-22T09:31:31Z","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/4513#discussion_r75645826","pull_request_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/4513","_links":{"self":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/comments/75645826"},"html":{"href":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/4513#discussion_r75645826"},"pull_request":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/4513"}}},"pull_request":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/4513","id":82123184,"html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/4513","diff_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/4513.diff","patch_url":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/4513.patch","issue_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/4513","number":4513,"state":"open","locked":false,"title":"Recycle Items schedule/force","user":{"login":"Gobberwart","id":20783738,"avatar_url":"https://avatars.githubusercontent.com/u/20783738?v=3","gravatar_id":"","url":"https://api.github.com/users/Gobberwart","html_url":"https://github.com/Gobberwart","followers_url":"https://api.github.com/users/Gobberwart/followers","following_url":"https://api.github.com/users/Gobberwart/following{/other_user}","gists_url":"https://api.github.com/users/Gobberwart/gists{/gist_id}","starred_url":"https://api.github.com/users/Gobberwart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gobberwart/subscriptions","organizations_url":"https://api.github.com/users/Gobberwart/orgs","repos_url":"https://api.github.com/users/Gobberwart/repos","events_url":"https://api.github.com/users/Gobberwart/events{/privacy}","received_events_url":"https://api.github.com/users/Gobberwart/received_events","type":"User","site_admin":false},"body":"## Short Description:\r\n\r\nAdded functionality to the Item recycler (recycle_items.py) which allows users to schedule regular recycles regardless of min_empty_space setting.\r\n\r\n## Fixes/Resolves/Closes \r\n\r\n-Fixes #4417 \r\n-Fixes issue caused by #3948 \r\n\r\n- Added ability to schedule a forced item recycle regardless of\r\nmin_empty_space setting. Allows individual items to be recycled based on\r\n\"keep\" settings, even when bag is not nearing capacity.\r\n\r\n- Added inventory refresh to bot tick (__init.py__) to ensure web\r\ndisplays information correctly.","created_at":"2016-08-22T00:58:53Z","updated_at":"2016-08-22T09:31:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69aea681b327b2bca35d76d3051d518d45cbcb66","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/4513/commits","review_comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/4513/comments","review_comment_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/4513/comments","statuses_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/statuses/80acac7f24b3cbc71c2f6dd77aff009df47b4976","head":{"label":"Gobberwart:dev","ref":"dev","sha":"80acac7f24b3cbc71c2f6dd77aff009df47b4976","user":{"login":"Gobberwart","id":20783738,"avatar_url":"https://avatars.githubusercontent.com/u/20783738?v=3","gravatar_id":"","url":"https://api.github.com/users/Gobberwart","html_url":"https://github.com/Gobberwart","followers_url":"https://api.github.com/users/Gobberwart/followers","following_url":"https://api.github.com/users/Gobberwart/following{/other_user}","gists_url":"https://api.github.com/users/Gobberwart/gists{/gist_id}","starred_url":"https://api.github.com/users/Gobberwart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gobberwart/subscriptions","organizations_url":"https://api.github.com/users/Gobberwart/orgs","repos_url":"https://api.github.com/users/Gobberwart/repos","events_url":"https://api.github.com/users/Gobberwart/events{/privacy}","received_events_url":"https://api.github.com/users/Gobberwart/received_events","type":"User","site_admin":false},"repo":{"id":66172984,"name":"PokemonGo-Bot","full_name":"Gobberwart/PokemonGo-Bot","owner":{"login":"Gobberwart","id":20783738,"avatar_url":"https://avatars.githubusercontent.com/u/20783738?v=3","gravatar_id":"","url":"https://api.github.com/users/Gobberwart","html_url":"https://github.com/Gobberwart","followers_url":"https://api.github.com/users/Gobberwart/followers","following_url":"https://api.github.com/users/Gobberwart/following{/other_user}","gists_url":"https://api.github.com/users/Gobberwart/gists{/gist_id}","starred_url":"https://api.github.com/users/Gobberwart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Gobberwart/subscriptions","organizations_url":"https://api.github.com/users/Gobberwart/orgs","repos_url":"https://api.github.com/users/Gobberwart/repos","events_url":"https://api.github.com/users/Gobberwart/events{/privacy}","received_events_url":"https://api.github.com/users/Gobberwart/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Gobberwart/PokemonGo-Bot","description":"The Pokemon Go Bot, baking with community.","fork":true,"url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot","forks_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/forks","keys_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/teams","hooks_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/hooks","issue_events_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/issues/events{/number}","events_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/events","assignees_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/assignees{/user}","branches_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/branches{/branch}","tags_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/tags","blobs_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/statuses/{sha}","languages_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/languages","stargazers_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/stargazers","contributors_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/contributors","subscribers_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/subscribers","subscription_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/subscription","commits_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/contents/{+path}","compare_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/merges","archive_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/downloads","issues_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/issues{/number}","pulls_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/pulls{/number}","milestones_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/milestones{/number}","notifications_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/labels{/name}","releases_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/releases{/id}","deployments_url":"https://api.github.com/repos/Gobberwart/PokemonGo-Bot/deployments","created_at":"2016-08-20T23:49:42Z","updated_at":"2016-08-20T23:49:43Z","pushed_at":"2016-08-22T01:27:33Z","git_url":"git://github.com/Gobberwart/PokemonGo-Bot.git","ssh_url":"git@github.com:Gobberwart/PokemonGo-Bot.git","clone_url":"https://github.com/Gobberwart/PokemonGo-Bot.git","svn_url":"https://github.com/Gobberwart/PokemonGo-Bot","homepage":"","size":7664,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PokemonGoF:dev","ref":"dev","sha":"c6ce99ecb89825b5308ea333e26939f864a2232c","user":{"login":"PokemonGoF","id":20551204,"avatar_url":"https://avatars.githubusercontent.com/u/20551204?v=3","gravatar_id":"","url":"https://api.github.com/users/PokemonGoF","html_url":"https://github.com/PokemonGoF","followers_url":"https://api.github.com/users/PokemonGoF/followers","following_url":"https://api.github.com/users/PokemonGoF/following{/other_user}","gists_url":"https://api.github.com/users/PokemonGoF/gists{/gist_id}","starred_url":"https://api.github.com/users/PokemonGoF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PokemonGoF/subscriptions","organizations_url":"https://api.github.com/users/PokemonGoF/orgs","repos_url":"https://api.github.com/users/PokemonGoF/repos","events_url":"https://api.github.com/users/PokemonGoF/events{/privacy}","received_events_url":"https://api.github.com/users/PokemonGoF/received_events","type":"Organization","site_admin":false},"repo":{"id":63752974,"name":"PokemonGo-Bot","full_name":"PokemonGoF/PokemonGo-Bot","owner":{"login":"PokemonGoF","id":20551204,"avatar_url":"https://avatars.githubusercontent.com/u/20551204?v=3","gravatar_id":"","url":"https://api.github.com/users/PokemonGoF","html_url":"https://github.com/PokemonGoF","followers_url":"https://api.github.com/users/PokemonGoF/followers","following_url":"https://api.github.com/users/PokemonGoF/following{/other_user}","gists_url":"https://api.github.com/users/PokemonGoF/gists{/gist_id}","starred_url":"https://api.github.com/users/PokemonGoF/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PokemonGoF/subscriptions","organizations_url":"https://api.github.com/users/PokemonGoF/orgs","repos_url":"https://api.github.com/users/PokemonGoF/repos","events_url":"https://api.github.com/users/PokemonGoF/events{/privacy}","received_events_url":"https://api.github.com/users/PokemonGoF/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PokemonGoF/PokemonGo-Bot","description":"The Pokemon Go Bot, baking with community.","fork":false,"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot","forks_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/forks","keys_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/teams","hooks_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/hooks","issue_events_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/events{/number}","events_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/events","assignees_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/assignees{/user}","branches_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/branches{/branch}","tags_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/tags","blobs_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/git/refs{/sha}","trees_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/statuses/{sha}","languages_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/languages","stargazers_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/stargazers","contributors_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/contributors","subscribers_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/subscribers","subscription_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/subscription","commits_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/commits{/sha}","git_commits_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/git/commits{/sha}","comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/comments{/number}","issue_comment_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/comments{/number}","contents_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/contents/{+path}","compare_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/merges","archive_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/downloads","issues_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues{/number}","pulls_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls{/number}","milestones_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/milestones{/number}","notifications_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/labels{/name}","releases_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/releases{/id}","deployments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/deployments","created_at":"2016-07-20T05:31:53Z","updated_at":"2016-08-22T09:27:57Z","pushed_at":"2016-08-22T08:37:12Z","git_url":"git://github.com/PokemonGoF/PokemonGo-Bot.git","ssh_url":"git@github.com:PokemonGoF/PokemonGo-Bot.git","clone_url":"https://github.com/PokemonGoF/PokemonGo-Bot.git","svn_url":"https://github.com/PokemonGoF/PokemonGo-Bot","homepage":"","size":13230,"stargazers_count":3574,"watchers_count":3574,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1633,"mirror_url":null,"open_issues_count":108,"forks":1633,"open_issues":108,"watchers":3574,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/4513"},"html":{"href":"https://github.com/PokemonGoF/PokemonGo-Bot/pull/4513"},"issue":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/4513"},"comments":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/4513/comments"},"review_comments":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/4513/comments"},"review_comment":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/pulls/4513/commits"},"statuses":{"href":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/statuses/80acac7f24b3cbc71c2f6dd77aff009df47b4976"}}}}
{"actor":{"display_login":"BriceSD"}}