diff --git a/CHANGELOG.markdown b/CHANGELOG.markdown index d646009..29bf338 100644 --- a/CHANGELOG.markdown +++ b/CHANGELOG.markdown @@ -1,3 +1,7 @@ +## next + +* fix: newer twitter accounts not fetching new posts past the initial historical fetch + ## v1.6.1 Released 2019-07-23 diff --git a/tasks.py b/tasks.py index 03bd57b..703ba73 100644 --- a/tasks.py +++ b/tasks.py @@ -157,7 +157,11 @@ def fetch_acc(id_): # ??? raise TemporaryError("Fetching posts went horribly wrong") - if len(posts) == 0: + if ( + len([post for post in posts if post.remote_id not in (max_id, since_id)]) + == 0 + ): + # if there are no posts other than the edges # we either finished the historic fetch # or we finished the current batch account.fetch_history_complete = True