diff --git a/go/twitterchiver/related_fetcher/fetcher.go b/go/twitterchiver/related_fetcher/fetcher.go index 1188159dd5..fc5f55d7f1 100644 --- a/go/twitterchiver/related_fetcher/fetcher.go +++ b/go/twitterchiver/related_fetcher/fetcher.go @@ -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 }