Skip to content

Commit c2258a5

Browse files
committed
Update RabbitMQ URL and add additional command in entrypoint script
1 parent 860a169 commit c2258a5

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.env.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ POSTGRES_PORT=
88
MEASUREMENTS_DB=
99
MEASUREMENTS_SCHEMA=
1010

11-
RABBITMQ_URL=
11+
CLOUDAMQP_URL=
1212
QUEUE_NAME=

app/service/common/middleware.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class Middleware:
77
def __init__(self):
88
self._connection = pika.BlockingConnection(
99
parameters=pika.URLParameters(
10-
os.environ.get("RABBITMQ_URL", "amqp://rabbitmq:5672")))
10+
os.environ.get("CLOUDAMQP_URL", "amqp://rabbitmq:5672")))
1111
self._channel = self._connection.channel()
1212
self._exit = False
1313
self._remake = False

entrypoint-heroku.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/bash
22

3-
uvicorn main:app --host 0.0.0.0 --port ${PORT}
3+
uvicorn main:app --host 0.0.0.0 --port ${PORT} &
4+
python main_rabbitmq.py

0 commit comments

Comments
 (0)