diff --git a/app/main.py b/app/main.py index ca3244e..538eefb 100644 --- a/app/main.py +++ b/app/main.py @@ -1,10 +1,10 @@ -import re, sys, pathlib +import re, sys, pathlib, asyncio sys.path.append(str(pathlib.Path(__file__).resolve().parents[1])) import json5 as json -from wsgiref.simple_server import make_server from app.services.comments import return_pr_decision from app.services.triggers import parseTriggers from app.models.trigger import Trigger +from wsgiref.simple_server import make_server def application(environ, start_response) -> bytearray: start_response('200 OK', [('Content-Type', 'application/json')]) @@ -17,12 +17,13 @@ def application(environ, start_response) -> bytearray: trigger: Trigger = parseTriggers(json_dict) - return_pr_decision(trigger) + # return_pr_decision(trigger) return ["success".encode('utf-8')] if __name__ == "__main__": + port = 4567 httpd = make_server("0.0.0.0", port , application) print("serving http on port {0}...".format(str(port)))