async def proceed(self, worker): info = worker.account_info() warning_ = info["warning"] level = info["level"] eggs = egg_count(worker) lures = lure_count(worker) await db_set_logged_in_stats(info.username, lures, eggs, level) if warning_: db_set_warned(info, datetime.datetime.now()) return True
def beh_handle_level_up(worker, previous_level): new_level = int(worker.account_info()["level"]) if previous_level and new_level != previous_level: worker.do_collect_level_up(new_level) if new_level != previous_level: db_set_account_level(worker.account_info().username, new_level) db_set_egg_count(worker.account_info().username, egg_count(worker)) db_set_lure_count(worker.account_info().username, lure_count(worker)) return new_level
async def proceed(worker): info = worker.account_info() warning_ = info["warning"] level = info["level"] eggs = egg_count(worker) lures = lure_count(worker) await db_set_logged_in_stats(info.username, lures, eggs, level) log.info("{} level {}, {} lures {} eggs".format(worker.name(), level, lures, eggs)) if warning_: db_set_warned(info, datetime.datetime.now()) return False