Skip to content

Commit

Permalink
added test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyQuitt committed Apr 13, 2021
1 parent b9a449c commit 5a45075
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: python app.py
web: python test.py
4 changes: 3 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
from ques import Ques
from refresh_ranges import RefreshRanges

LOCAL_SERVER_ADDRESS = 'https://127.0.0.1:5000/refresh_all'

RANGES_REFRESH_RATE = 10

WAITER_ADDRESS_HTTP_PARAM_NAME = 'waiter_address'
Expand Down Expand Up @@ -747,7 +749,7 @@ def refresh():

def call_refresh_endpoint():
my_logger.debug("making HTTP request")
r = requests.get('https://127.0.0.1:5000/refresh_all', verify=False)
r = requests.get(LOCAL_SERVER_ADDRESS, verify=False)


if __name__ == "__main__":
Expand Down
17 changes: 17 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from flask import Flask

app = Flask(__name__)


@app.route("/")
def index():
return "<h1>Index</h1>"


@app.route("/test")
def test():
return "<h1>success</h1>"


if __name__ == "__main__":
app.run()

0 comments on commit 5a45075

Please sign in to comment.