Changed after_pick() logic

This commit is contained in:
Anon 2023-03-12 19:43:45 -07:00
parent 9e15563999
commit da2cce36fb

View File

@ -180,7 +180,7 @@ class YandereBot:
def pick(self): def pick(self):
return None return None
def after_pick(self, picked): def after_post(self, picked):
return picked return picked
def handle_post_exception(self): def handle_post_exception(self):
@ -203,8 +203,6 @@ class YandereBot:
self.currentSessionCount += 1 self.currentSessionCount += 1
self.consecutive_failed_uploads = 0 self.consecutive_failed_uploads = 0
self.after_pick(picked)
# The post was successful # The post was successful
return picked return picked
@ -241,7 +239,8 @@ class YandereBot:
def main_loop(self): def main_loop(self):
sleep_seconds = self.settings["settings_behavior"]["retry_seconds"] sleep_seconds = self.settings["settings_behavior"]["retry_seconds"]
while self.can_post(): while self.can_post():
self.post(self.pick()) picked = self.post(self.pick())
self.after_post(picked)
if self.can_post(): if self.can_post():
self.eventSleep.wait(sleep_seconds) self.eventSleep.wait(sleep_seconds)