Skip to content

Commit

Permalink
Merge pull request #4 from mervynsimzr/issue/3/not-parsing-env-var-co…
Browse files Browse the repository at this point in the history
…rrectly

Fixes gpkc/nameko-microservices/#3
  • Loading branch information
gpkc authored Oct 26, 2019
2 parents ae2848a + f1f9f3b commit f361f52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
- redis-data:/data

rabbit:
image: rabbitmq:3.6-management
image: rabbitmq:3-management
ports:
- "15672:15672"

Expand Down Expand Up @@ -53,4 +53,5 @@ services:
RABBIT_PORT: "5672"

volumes:
redis-data:
redis-data:

4 changes: 2 additions & 2 deletions trips/trips.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ class TripsService:

@rpc
def get(self, trip_id):
trip = self.redis.get(trip_id)
trip = self.redis.hgetall(trip_id)
return trip

@rpc
def create(self, airport_from_id, airport_to_id):
trip_id = uuid.uuid4().hex
self.redis.set(trip_id, {
self.redis.hmset(trip_id, {
"from": airport_from_id,
"to": airport_to_id
})
Expand Down

0 comments on commit f361f52

Please sign in to comment.