Skip to content

Commit

Permalink
Warns if there aren't sufficient space left for loot.
Browse files Browse the repository at this point in the history
SpinFort will terminate silently, and users will not notice
that SpinFort is skipping due to the lack of space.

As a result, it sends out requests to Niantic even faster than before
becuase tasks are looping faster and doing noops. More server busy (error 52)
errors appear in the log without an explanation of what's actually
going on.
  • Loading branch information
leoskyrocker committed Jul 31, 2016
1 parent cc3e954 commit 56e72e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pokemongo_bot/cell_workers/move_to_fort.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

class MoveToFort(BaseTask):
def should_run(self):
if not self.bot.has_space_for_loot():
logger.log("Not moving to any forts as there aren't enough space. You might want to change your config to recycle more items if this message appears consistently.", 'yellow')
return (self.bot.has_space_for_loot()) or self.bot.softban

def work(self):
Expand Down
2 changes: 2 additions & 0 deletions pokemongo_bot/cell_workers/spin_fort.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

class SpinFort(BaseTask):
def should_run(self):
if not self.bot.has_space_for_loot():
logger.log("Not spinning any forts as there aren't enough space. You might want to change your config to recycle more items if this message appears consistently.", 'yellow')
return self.bot.has_space_for_loot()

def work(self):
Expand Down

0 comments on commit 56e72e4

Please sign in to comment.