twitterchiver/relatedfetcher: wire bucket from flag into worker config
This commit is contained in:
parent
bab069b286
commit
7a48bccf36
1 changed files with 8 additions and 0 deletions
|
@ -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{
|
||||
|
|
Loading…
Reference in a new issue