Commit 14b22146 authored by Stavros-Anastasios Charismiadis's avatar Stavros-Anastasios Charismiadis
Browse files

Resolve review comment: Remove commented code

parent 67e283a9
Loading
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
@@ -136,8 +136,3 @@ subscriber = Subscriber()
@app.app.before_first_request
@app.app.before_first_request
def create_listener_message():
def create_listener_message():
    executor.submit(subscriber.listen)
    executor.submit(subscriber.listen)

# if __name__ == '__main__':
#     import logging
#     app.run(debug=True, port=8080)
+0 −2
Original line number Original line Diff line number Diff line
@@ -14,7 +14,5 @@ curl -vv -k -retry 30 \
    --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" 2>/dev/null | jq -r '.data.data.pub_key' -j > /usr/src/app/api_invoker_management/pubkey.pem
    --request GET "$VAULT_ADDR/v1/secret/data/server_cert/pub" 2>/dev/null | jq -r '.data.data.pub_key' -j > /usr/src/app/api_invoker_management/pubkey.pem




#cd /usr/src/app/
#python3 -m api_invoker_management
gunicorn --bind 0.0.0.0:8080 \
gunicorn --bind 0.0.0.0:8080 \
         --chdir /usr/src/app/api_invoker_management wsgi:app
         --chdir /usr/src/app/api_invoker_management wsgi:app
 No newline at end of file
+0 −4
Original line number Original line Diff line number Diff line
@@ -14,7 +14,6 @@ def make_response(object, status):




def internal_server_error(detail, cause):
def internal_server_error(detail, cause):
    # prob = ProblemDetails(type="http://www.ietf.org/rfc/rfc2396.txt", instance="http://www.ietf.org/rfc/rfc2396.txt", title="Internal Server Error", status=500, detail=detail, cause=cause, invalid_params=[{"param":"","reason":""}], supported_features="fffff")
    prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause)
    prob = ProblemDetails(title="Internal Server Error", status=500, detail=detail, cause=cause)


    prob = prob.to_dict()
    prob = prob.to_dict()
@@ -29,12 +28,10 @@ def forbidden_error(detail, cause):
    prob = prob.to_dict()
    prob = prob.to_dict()
    prob = clean_empty(prob)
    prob = clean_empty(prob)


    # return Response(json.dumps(dict_to_camel_case(prob.to_dict()), cls=JSONEncoder), status=403, mimetype=mimetype)
    return Response(json.dumps(dict_to_camel_case(prob), cls=JSONEncoder), status=403, mimetype=mimetype)
    return Response(json.dumps(dict_to_camel_case(prob), cls=JSONEncoder), status=403, mimetype=mimetype)




def bad_request_error(detail, cause, invalid_params):
def bad_request_error(detail, cause, invalid_params):
    # prob = ProblemDetails(type="http://www.ietf.org/rfc/rfc2396.txt", instance="http://www.ietf.org/rfc/rfc2396.txt", title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params, supported_features="fffff")
    prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params)
    prob = ProblemDetails(title="Bad Request", status=400, detail=detail, cause=cause, invalid_params=invalid_params)


    prob = prob.to_dict()
    prob = prob.to_dict()
@@ -44,7 +41,6 @@ def bad_request_error(detail, cause, invalid_params):




def not_found_error(detail, cause):
def not_found_error(detail, cause):
    # prob = ProblemDetails(type="http://www.ietf.org/rfc/rfc2396.txt", instance="http://www.ietf.org/rfc/rfc2396.txt", title="Not Found", status=404, detail=detail, cause=cause, invalid_params=[{"param":"","reason":""}], supported_features="fffff")
    prob = ProblemDetails(title="Not Found", status=404, detail=detail, cause=cause)
    prob = ProblemDetails(title="Not Found", status=404, detail=detail, cause=cause)


    prob = prob.to_dict()
    prob = prob.to_dict()
+0 −4
Original line number Original line Diff line number Diff line
@@ -139,7 +139,3 @@ scheduler.start()
def up_listener():
def up_listener():
    with scheduler.app.app_context():
    with scheduler.app.app_context():
        executor.submit(subscriber.listen())
        executor.submit(subscriber.listen())

# if __name__ == '__main__':
#     scheduler.start()
#     app.run(debug=True,port=8080, use_reloader=False)
+0 −3
Original line number Original line Diff line number Diff line
@@ -5,12 +5,9 @@ from models.api_invoker_policy import ApiInvokerPolicy
from models.time_range_list import TimeRangeList
from models.time_range_list import TimeRangeList
from datetime import datetime, timedelta
from datetime import datetime, timedelta


from core.publisher import Publisher
from .redis_event import RedisEvent
from .redis_event import RedisEvent
from util import dict_to_camel_case, clean_empty
from util import dict_to_camel_case, clean_empty


publisher_ops = Publisher()



class InternalServiceOps(Resource):
class InternalServiceOps(Resource):


Loading