Skip to content

Commit

Permalink
fix: gcp pubsub project id config (colibri-project-io#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkanjoms authored Oct 28, 2023
1 parent b895bcc commit a144015
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/messaging/gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package messaging
import (
"context"
"encoding/json"
"os"

"cloud.google.com/go/pubsub"
"github.com/colibri-project-io/colibri-sdk-go/pkg/base/logging"
Expand All @@ -13,7 +14,7 @@ type gcpMessaging struct {
}

func newGcpMessaging() *gcpMessaging {
client, err := pubsub.NewClient(context.Background(), "config.PROJECT_ID")
client, err := pubsub.NewClient(context.Background(), os.Getenv("PUBSUB_PROJECT_ID"))
if err != nil {
logging.Fatal(connection_error, err)
}
Expand Down

0 comments on commit a144015

Please sign in to comment.