fix logic error of handling finished tweets

This commit is contained in:
muskit
2024-04-26 00:15:45 -07:00
parent 24877eb53e
commit eadf130305
+2 -2
View File
@@ -73,9 +73,9 @@ class TalentTweetQueue:
for line in f: for line in f:
if len(line) > 0: if len(line) > 0:
ttweet = tt.TalentTweet.deserialize(line) ttweet = tt.TalentTweet.deserialize(line)
if ttweet.tweet_id in self.ttweets_dict: if ttweet.tweet_id not in self.ttweets_dict:
self.ttweets_dict[ttweet.tweet_id] = ttweet
print(f"adding unfinished tweet {ttweet.tweet_id}") print(f"adding unfinished tweet {ttweet.tweet_id}")
self.ttweets_dict[ttweet.tweet_id] = ttweet
# finished ttweets # finished ttweets
try: try:
with open(self.finished_ttweets_path, "r") as f: with open(self.finished_ttweets_path, "r") as f: