Skip to content

Commit

Permalink
Update environment variable name to match config.exs (mercadona#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
lonamiaec authored Jan 24, 2020
1 parent b700f66 commit 942d584
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion config/releases.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Config
config :postoffice, PostofficeWeb.Endpoint,
secret_key_base: {:system, "SECRET_KEY_BASE", default: "12121212"}

config :postoffice, pubsub_project_name: {:system, "GCLOUD_PUBSUB_PROJECT", default: "test"}
config :postoffice, pubsub_project_name: {:system, "GCLOUD_PUBSUB_PROJECT_ID", default: "test"}

config :postoffice, Postoffice.Repo,
username: {:system, "DB_USERNAME", default: "postgres"},
Expand Down
5 changes: 2 additions & 3 deletions lib/postoffice/adapters/pubsub.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ defmodule Postoffice.Adapters.Pubsub do
@impl true
def publish(endpoint, message) do
Logger.info("Publishing PubSub message to #{endpoint}")
%{payload: payload, attributes: attributes} = message
%{payload: payload, attributes: _attributes} = message
# Authenticate
case Goth.Token.for_scope("https://www.googleapis.com/auth/cloud-platform") do
{:ok, token} ->
Expand All @@ -16,8 +16,7 @@ defmodule Postoffice.Adapters.Pubsub do
request = %GoogleApi.PubSub.V1.Model.PublishRequest{
messages: [
%GoogleApi.PubSub.V1.Model.PubsubMessage{
data: Base.encode64(Poison.encode!(payload)),
attributes: attributes
data: Base.encode64(Poison.encode!(payload))
}
]
}
Expand Down

0 comments on commit 942d584

Please sign in to comment.