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

Only go through CompleteTutorial once at launch #4296

Merged
merged 1 commit into from
Aug 19, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion pokemongo_bot/cell_workers/complete_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ def initialize(self):
self.api = self.bot.api
self.nickname = self.config.get('nickname','')
self.team = self.config.get('team',0)
self.may_run = True

def should_run(self):
return True
return self.may_run

def work(self):

if not self.should_run():
return WorkerResult.SUCCESS

# Only execute the worker once to avoid error loop
self.may_run = False

if self._check_tutorial_state():
return WorkerResult.SUCCESS
else:
Expand Down