From e2c1081cf6f70b010d80344d91484f465459883a Mon Sep 17 00:00:00 2001 From: Xiaolu Chen Date: Wed, 31 Jan 2018 11:26:12 +0800 Subject: [PATCH 01/11] no message --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 80a63c6..46cf364 100644 --- a/hello.py +++ b/hello.py @@ -23,7 +23,7 @@ @app.route('/') def hello(): - r = redis.StrictRedis(host=str(envRedis), port=25317) + r = redis.StrictRedis(host=str(envRedis), port=envRedisPort) hits = r.get('hits') if hits: hits = r.get('hits').decode('utf-8') From cd3f0627555e8b06f1c0ca6f461855492f9c14c5 Mon Sep 17 00:00:00 2001 From: Xiaolu Chen Date: Wed, 31 Jan 2018 11:40:38 +0800 Subject: [PATCH 02/11] no message --- hello.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hello.py b/hello.py index 46cf364..759e1da 100644 --- a/hello.py +++ b/hello.py @@ -8,6 +8,7 @@ import os import redis import ctypes +import time app = Flask(__name__) @@ -38,4 +39,5 @@ def index(): return 'chenxiaolu46oooo6' if __name__ == '__main__': + time.sleep(3600) app.run(host='0.0.0.0',port=5000) From 1741fba302c60f3e6d5deb841e39782a4be17806 Mon Sep 17 00:00:00 2001 From: Xiaolu Chen Date: Wed, 31 Jan 2018 14:05:19 +0800 Subject: [PATCH 03/11] no message --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 759e1da..0278aec 100644 --- a/hello.py +++ b/hello.py @@ -39,5 +39,5 @@ def index(): return 'chenxiaolu46oooo6' if __name__ == '__main__': - time.sleep(3600) + time.sleep(3600) app.run(host='0.0.0.0',port=5000) From e30235b21ced91482957f1a6a812d8c0b688e918 Mon Sep 17 00:00:00 2001 From: solochen84 <276573129@qq.com> Date: Thu, 8 Feb 2018 09:53:55 +0800 Subject: [PATCH 04/11] Update hello.py --- hello.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hello.py b/hello.py index 0278aec..d02aaef 100644 --- a/hello.py +++ b/hello.py @@ -3,12 +3,13 @@ __author__ = 'cloudtogo' -from flask import render_template +from flask import render_template, redirect from flask import Flask import os import redis import ctypes import time +import requests app = Flask(__name__) @@ -21,6 +22,7 @@ envURL = os.environ.get("WEBIDE") envRedis = os.environ.get("REDIS") envRedisPort = os.environ.get("REDIS_PORT") +envExternalUrl = os.environ.get("EXTERNAL_URL") @app.route('/') def hello(): @@ -36,8 +38,9 @@ def hello(): @app.route('/index') def index(): - return 'chenxiaolu46oooo6' + url='http://'+envExternalUrl + return redirect(url) + if __name__ == '__main__': - time.sleep(3600) app.run(host='0.0.0.0',port=5000) From 1d5936f21bb800ba1475de77a053026430052e87 Mon Sep 17 00:00:00 2001 From: solochen84 <276573129@qq.com> Date: Thu, 8 Feb 2018 09:54:39 +0800 Subject: [PATCH 05/11] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 1a5dc97..b8a0ee2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ flask redis +requests From dcc8e416e31860c25a4d25470d8262f43da9167b Mon Sep 17 00:00:00 2001 From: solochen84 <276573129@qq.com> Date: Thu, 8 Feb 2018 10:48:24 +0800 Subject: [PATCH 06/11] Update hello.py --- hello.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hello.py b/hello.py index d02aaef..e25244e 100644 --- a/hello.py +++ b/hello.py @@ -39,7 +39,8 @@ def hello(): @app.route('/index') def index(): url='http://'+envExternalUrl - return redirect(url) + r = requests.get(url) + return 'hello'+r.text if __name__ == '__main__': From 34267c76addbef62a5847ff86f50dcaf5853f215 Mon Sep 17 00:00:00 2001 From: solochen84 <276573129@qq.com> Date: Thu, 8 Feb 2018 15:36:38 +0800 Subject: [PATCH 07/11] Update hello.py --- hello.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hello.py b/hello.py index e25244e..c5bd733 100644 --- a/hello.py +++ b/hello.py @@ -23,6 +23,7 @@ envRedis = os.environ.get("REDIS") envRedisPort = os.environ.get("REDIS_PORT") envExternalUrl = os.environ.get("EXTERNAL_URL") +envFileInput = os.environ.get("FILEINPUT") @app.route('/') def hello(): @@ -38,9 +39,9 @@ def hello(): @app.route('/index') def index(): - url='http://'+envExternalUrl - r = requests.get(url) - return 'hello'+r.text + #url='http://'+envExternalUrl + #r = requests.get(url) + return 'hello'+envFileInput if __name__ == '__main__': From dbdcaf32d1eb47ff2bb86fae611b00021033ff58 Mon Sep 17 00:00:00 2001 From: solochen84 <276573129@qq.com> Date: Fri, 9 Feb 2018 19:55:35 +0800 Subject: [PATCH 08/11] Update hello.py --- hello.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hello.py b/hello.py index c5bd733..00cc876 100644 --- a/hello.py +++ b/hello.py @@ -10,6 +10,7 @@ import ctypes import time import requests +import socket app = Flask(__name__) @@ -41,7 +42,8 @@ def hello(): def index(): #url='http://'+envExternalUrl #r = requests.get(url) - return 'hello'+envFileInput + ip = socket.gethostbyname(socket.gethostname()) + return 'hello'+ip if __name__ == '__main__': From 724952a9bca64f726a4c5960f3af215374467e86 Mon Sep 17 00:00:00 2001 From: solochen84 <276573129@qq.com> Date: Fri, 9 Feb 2018 19:55:57 +0800 Subject: [PATCH 09/11] Update requirements.txt --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index b8a0ee2..13be87f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ flask redis requests +socket From e0cf7354b655cf36d7a720caed6ced9cca03aca8 Mon Sep 17 00:00:00 2001 From: solochen84 <276573129@qq.com> Date: Fri, 9 Feb 2018 20:01:39 +0800 Subject: [PATCH 10/11] Update requirements.txt --- requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 13be87f..b8a0ee2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ flask redis requests -socket From 66c7a29688301833c6ebebdc22c6b47aa670ac1e Mon Sep 17 00:00:00 2001 From: solochen84 <276573129@qq.com> Date: Mon, 17 Dec 2018 11:46:09 +0800 Subject: [PATCH 11/11] Update hello.py --- hello.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hello.py b/hello.py index 00cc876..6cdddc4 100644 --- a/hello.py +++ b/hello.py @@ -43,7 +43,7 @@ def index(): #url='http://'+envExternalUrl #r = requests.get(url) ip = socket.gethostbyname(socket.gethostname()) - return 'hello'+ip + return 'helloaaa'+ip if __name__ == '__main__':