Skip to content

Commit 28b5142

Browse files
authored
Merge pull request #11 from Ifechukwu001/fix/rabbitmq
Changed params to use url
2 parents 875c436 + 127f719 commit 28b5142

File tree

5 files changed

+5
-16
lines changed

5 files changed

+5
-16
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@ JWT_ISSUER=xxx
2828
# time in minutes
2929
OTP_LIFETIME=10
3030

31-
RABBITMQ_HOST=localhost
31+
# amqp://username:password@host[:port]/
32+
RABBITMQ_URL=amqp://guest:guest@localhost:5672/

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ dependencies = [
1919
"pydantic[email]>=2.10.6",
2020
"django-ninja>=1.3.0",
2121
"pyjwt>=2.10.1",
22-
"pika>=1.3.2",
2322
"faststream[rabbit]>=0.5.39",
2423
"starlette>=0.46.2",
2524
"uvicorn>=0.34.1",

src/config/asgi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
from src.env import rabbitmq_config
1818

19-
broker = RabbitBroker(host=rabbitmq_config["host"])
19+
broker = RabbitBroker(rabbitmq_config["url"])
2020

2121

2222
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "src.config.settings")

src/env.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class OTP(TypedDict):
5151

5252

5353
class RabbitMQ(TypedDict):
54-
host: str
54+
url: str
5555

5656

5757
env = Env()
@@ -104,6 +104,6 @@ class RabbitMQ(TypedDict):
104104

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

107-
rabbitmq_config: RabbitMQ = {"host": get_env_str("RABBITMQ_HOST")}
107+
rabbitmq_config: RabbitMQ = {"url": get_env_str("RABBITMQ_URL")}
108108

109109
__all__ = ["app", "cache", "db", "env", "jwt_config", "log", "otp", "rabbitmq_config"]

uv.lock

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)