twitterchiver/related_fetcher: fix marking tweets as done if they had no related content
This commit is contained in:
parent
cc8f24e8e1
commit
50895e2aa3
1 changed files with 5 additions and 0 deletions
|
@ -273,6 +273,11 @@ func relatedFetchTick(ctx context.Context, cfg WorkerConfig) error {
|
|||
|
||||
log.Printf("[%v:%d] Got %d tweets to fetch (%v)", cfg.Name, t.ID, len(tweetIDsToFetch), tweetIDsToFetch)
|
||||
if len(tweetIDsToFetch) == 0 {
|
||||
if _, err := cfg.DatabasePool.Exec(ctx, "UPDATE tweets SET fetched_related_tweets=true WHERE id=$1", t.ID); err != nil {
|
||||
log.Printf("[%v:%d] Updating tweet to mark as completed: %v", cfg.Name, t.ID, err)
|
||||
} else {
|
||||
log.Printf("[%v:%d] Successfully marked as done (no tweets to fetch).", cfg.Name, t.ID)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue