|
|
@ -3,7 +3,7 @@ import connexion |
|
|
|
import datetime |
|
|
|
import logging |
|
|
|
import os |
|
|
|
|
|
|
|
import atexit |
|
|
|
from connexion import NoContent |
|
|
|
|
|
|
|
from nameko.standalone.rpc import ClusterRpcProxy |
|
|
@ -15,7 +15,6 @@ config = { |
|
|
|
'AMQP_URI': os.environ["AMQP_URI"] #"pyamqp://guest:guest@localhost" |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
def get_pets(limit, animal_type=None): |
|
|
|
with ClusterRpcProxy(config) as cluster_rpc: |
|
|
|
pets = cluster_rpc.pet_service.get_pets(limit, animal_type=animal_type) |
|
|
@ -52,4 +51,4 @@ app.add_api('swagger.yaml') |
|
|
|
application = app.app |
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
app.run(port=8080) |
|
|
|
app.run(port=8080, threaded=False) |