Skip to content

Commit

Permalink
19808 fixed topic names (#2569)
Browse files Browse the repository at this point in the history
  • Loading branch information
JazzarKarim authored Apr 5, 2024
1 parent 3a4a843 commit 76fe8d1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions queue_services/entity-pay/devops/vaults.gcp.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AUDIENCE="op://gcp-queue/$APP_ENV/payment/AUDIENCE"
ENTITY_FILER_TOPIC="op://gcp-queue/$APP_ENV/topics/ENTITY_FILER_TOPIC"
ENTITY_MAILER_TOPIC="op://gcp-queue/$APP_ENV/topics/ENTITY_MAILER_TOPIC"
BUSINESS_FILER_TOPIC="op://gcp-queue/$APP_ENV/topics/BUSINESS_FILER_TOPIC"
BUSINESS_EMAILER_TOPIC="op://gcp-queue/$APP_ENV/topics/BUSINESS_EMAILER_TOPIC"
DATABASE_NAME="op://database/$APP_ENV/business-db/DATABASE_NAME"
DATABASE_PASSWORD="op://database/$APP_ENV/business-db/DATABASE_PASSWORD"
DATABASE_PORT="op://database/$APP_ENV/business-db/DATABASE_PORT"
Expand Down
4 changes: 2 additions & 2 deletions queue_services/entity-pay/src/entity_pay/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class Config: # pylint: disable=too-few-public-methods

# pub/sub
GCP_AUTH_KEY = os.getenv("GCP_AUTH_KEY", None)
ENTITY_MAILER_TOPIC = os.getenv("ENTITY_MAILER_TOPIC", "mailer")
ENTITY_FILER_TOPIC = os.getenv("ENTITY_FILER_TOPIC", "filer")
BUSINESS_EMAILER_TOPIC = os.getenv("BUSINESS_EMAILER_TOPIC", "mailer")
BUSINESS_FILER_TOPIC = os.getenv("BUSINESS_FILER_TOPIC", "filer")
AUDIENCE = os.getenv("AUDIENCE", "https://pubsub.googleapis.com/google.pubsub.v1.Subscriber")
PUBLISHER_AUDIENCE = os.getenv("PUBLISHER_AUDIENCE", "https://pubsub.googleapis.com/google.pubsub.v1.Publisher")

Expand Down
4 changes: 2 additions & 2 deletions queue_services/entity-pay/src/entity_pay/resources/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def worker():
# 4. Publish to email Q
# ##
with suppress(Exception):
mail_topic = current_app.config.get("ENTITY_MAILER_TOPIC", "mailer")
mail_topic = current_app.config.get("BUSINESS_EMAILER_TOPIC", "mailer")
# pylint: disable-next=unused-variable
ret = queue.publish(topic=mail_topic, payload=queue.to_queue_message(cloud_event))
structured_log(request, "INFO", f"publish to emailer for pay-id: {payment_token.id}")
Expand All @@ -128,7 +128,7 @@ def worker():
# ##
with suppress(Exception):
if filing.effective_date <= filing.payment_completion_date:
filer_topic = current_app.config.get("ENTITY_FILER_TOPIC", "filer")
filer_topic = current_app.config.get("BUSINESS_FILER_TOPIC", "filer")
ret = queue.publish(topic=filer_topic, payload=queue.to_queue_message(cloud_event)) # noqa: F841
structured_log(request, "INFO", f"publish to filer for pay-id: {payment_token.id}")

Expand Down

0 comments on commit 76fe8d1

Please sign in to comment.