File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed
src/allocation/entrypoints Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 99 docker-compose build
1010
1111up :
12- docker-compose up -d app
12+ docker-compose up -d
1313
1414down :
1515 docker-compose down
1616
1717logs :
18- docker-compose logs --tail=100 app
18+ docker-compose logs --tail=100
1919
2020test : up test-e2e test-integration test-unit
2121
Original file line number Diff line number Diff line change 11version : " 3"
22services :
33 app :
4+ image : consmicpython/app
45 build :
56 context : .
67 dockerfile : Dockerfile
@@ -19,6 +20,27 @@ services:
1920 ports :
2021 - " 5005:80"
2122
23+ pubsub :
24+ image : consmicpython/pubsub
25+ build :
26+ context : .
27+ dockerfile : Dockerfile
28+ depends_on :
29+ - postgres
30+ - redis
31+ environment :
32+ - DB_HOST=postgres
33+ - DB_PASSWORD=abc123
34+ - API_HOST=pubsub
35+ - REDIS_HOST=redis
36+ - PYTHONDONTWRITEBYTECODE=1
37+ volumes :
38+ - ./src:/src
39+ - ./tests:/tests
40+ entrypoint :
41+ - python
42+ - /src/allocation/entrypoints/event_consumer.py
43+
2244 postgres :
2345 image : postgres:9.6
2446 environment :
Original file line number Diff line number Diff line change 55from allocation .domain import commands
66from redis import Redis
77
8- logger = logging .getLevelName (__name__ )
8+ logger = logging .getLogger (__name__ )
99redis_client = Redis (** config .get_redis_host_and_port ())
1010
1111
@@ -21,7 +21,7 @@ def main():
2121
2222def handle_change_batch_quantity (message , messagebus ):
2323 data = json .loads (message ["data" ])
24- command = commands .ChangeBatchQuantity (data ["reference " ], data ["qty" ])
24+ command = commands .ChangeBatchQuantity (data ["batchref " ], data ["qty" ])
2525 messagebus .handle (message = command )
2626
2727
You can’t perform that action at this time.
0 commit comments