Twitter: move timer reregistration up to the top of the timer routine
twitter will occasionally fail hard, when it was doing so this check for updates wasn't reregistering, making the bot stop checking eventually
This commit is contained in:
parent
5913a95165
commit
9a4f8b019a
@ -236,6 +236,9 @@ class Twitter(Module):
|
||||
def _check_self_timeline(self):
|
||||
"""Check my timeline, and if there are entries, print them to the channel."""
|
||||
|
||||
# re-register this check
|
||||
Timer(300, self._check_self_timeline, ()).start()
|
||||
|
||||
if self.authed:
|
||||
# get the id of the last check we made
|
||||
since_id = self._get_last_since_id()
|
||||
@ -263,9 +266,6 @@ class Twitter(Module):
|
||||
# set since_id
|
||||
self._set_last_since_id(new_since_id)
|
||||
|
||||
# re-register this check
|
||||
Timer(300, self._check_self_timeline, ()).start()
|
||||
|
||||
def _return_tweet_or_retweet_text(self, tweet, print_source=False):
|
||||
"""
|
||||
Return a string of the author and text body of a status,
|
||||
|
Loading…
Reference in New Issue
Block a user