This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository mum. See http://git.chorem.org/mum.git commit a895f0985534383f4f97077d1bab30b65a8882c5 Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Fri Mar 13 15:12:17 2015 +0100 process_monitoring proprement arreté après KeyboardInterrupt --- .gitignore | 3 ++- app/app.py | 4 +++- app/process_monitoring.py | 4 +++- bootstrap.sh | 8 ++++---- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 3e1bfa5..057b930 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,5 @@ res.xml mum.db */pyc /*.pyc -*/*.pyc \ No newline at end of file +*/*.pyc +mum.conf \ No newline at end of file diff --git a/app/app.py b/app/app.py index 36c9804..a7f4962 100755 --- a/app/app.py +++ b/app/app.py @@ -179,4 +179,6 @@ if __name__ == '__main__': wsc = WebSocketContainer(ml.get_db()) process_monitoring.init(ml, wsc) port = int(os.environ.get('PORT', 1337)) - run(host='0.0.0.0', port=port, debug=True, server=GeventWebSocketServer) \ No newline at end of file + run(host='0.0.0.0', port=port, server=GeventWebSocketServer) + # after ending + process_monitoring.end = True diff --git a/app/process_monitoring.py b/app/process_monitoring.py index 357613b..c056d7f 100644 --- a/app/process_monitoring.py +++ b/app/process_monitoring.py @@ -7,6 +7,7 @@ import time import sys waiting_list = [] +end = False def init(ml,wsc): @@ -45,9 +46,10 @@ class ProcessMonitoring(threading.Thread): If it is the case, it will add this element to the launching list, as well with the previous elements having the same launching date. """ + global end global waiting_list ready_to_launch = False - while True: + while not end: if not waiting_list == []: modules_to_run = [] while waiting_list[len(waiting_list) - 1]['time'] <= datetime.now(): diff --git a/bootstrap.sh b/bootstrap.sh index d3e4e99..589c9be 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -10,10 +10,10 @@ sed -i 's/{{/[[/g' venv/lib/python2.7/site-packages/bottle.py sed -i 's/}}/]]/g' venv/lib/python2.7/site-packages/bottle.py #creating the configuration file -touch toto.conf -echo "db_location=$HOME/.mum/mum.db" >> toto.conf -echo "external_modules_location=$HOME/.mum/external" >> toto.conf -echo "keys_location=$HOME/.mum/keys/" >> toto.conf +touch mum.conf +echo "db_location=$HOME/.mum/mum.db" >> mum.conf +echo "external_modules_location=$HOME/.mum/external" >> mum.conf +echo "keys_location=$HOME/.mum/keys/" >> mum.conf # creating the basic folders mkdir $HOME/.mum -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.