diff --git a/go/twitterchiver/related_fetcher/fetcher.go b/go/twitterchiver/related_fetcher/fetcher.go index d80fd21a64..b05a2778c5 100644 --- a/go/twitterchiver/related_fetcher/fetcher.go +++ b/go/twitterchiver/related_fetcher/fetcher.go @@ -457,6 +457,13 @@ func main() { } defer conn.Close() + bucket, err := blob.OpenBucket(ctx, *mediaFetchDestination) + if err != nil { + fmt.Fprintf(os.Stderr, "Unable to connect to bucket: %v\n", err) + os.Exit(1) + } + defer bucket.Close() + ckey, csecret := os.Getenv("TWITTER_OAUTH_CONSUMER_KEY"), os.Getenv("TWITTER_OAUTH_CONSUMER_SECRET") if ckey == "" || csecret == "" { fmt.Fprintf(os.Stderr, "No TWITTER_OAUTH_CONSUMER_KEY or TWITTER_OAUTH_CONSUMER_SECRET\n") @@ -508,6 +515,7 @@ func main() { DatabasePool: conn, WorkQueue: workQueue, + Bucket: bucket, } configs := map[string]WorkerConfig{ "media": cfg.Merge(WorkerConfig{