Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ OTP_LIFETIME=10
API_GATEWAY_PUBLIC_KEY=xxxxxxxxxxxxxxxxxxxxxxxx
API_KEY_EXPIRES_AT=2

RABBITMQ_HOST=localhost
# amqp://username:password@host[:port]/
RABBITMQ_URL=amqp://guest:guest@localhost:5672/
2 changes: 1 addition & 1 deletion src/config/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from src.env import rabbitmq_config

broker = RabbitBroker(host=rabbitmq_config["host"])
broker = RabbitBroker(rabbitmq_config["url"])


os.environ.setdefault("DJANGO_SETTINGS_MODULE", "src.config.settings")
Expand Down
4 changes: 2 additions & 2 deletions src/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class OTP(TypedDict):


class RabbitMQ(TypedDict):
host: str
url: str


env = Env()
Expand Down Expand Up @@ -109,7 +109,7 @@ class RabbitMQ(TypedDict):

otp: OTP = {"lifetime": get_env_int("OTP_LIFETIME")}

rabbitmq_config: RabbitMQ = {"host": get_env_str("RABBITMQ_HOST")}
rabbitmq_config: RabbitMQ = {"url": get_env_str("RABBITMQ_URL")}


__all__ = [
Expand Down