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 a1175ea2326e3dea53dd9471076d64edb361ff0c Author: Alexis Guilbaud <guilbaud@codelutin.com> Date: Thu Feb 26 15:42:54 2015 +0100 optimization on process_monitoring --- app/process_monitoring.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/process_monitoring.py b/app/process_monitoring.py index 3e92499..8ddbb04 100644 --- a/app/process_monitoring.py +++ b/app/process_monitoring.py @@ -47,6 +47,7 @@ class ProcessMonitoring(threading.Thread): having the same launching date. """ global waiting_list + ready_to_launch = False while True: if not waiting_list == []: modules_to_run = [] @@ -55,8 +56,11 @@ class ProcessMonitoring(threading.Thread): modules_to_run.append(dict_mod) dict_mod['time'] = dict_mod['time'] + timedelta(seconds=dict_mod['freq']) add_to_waiting_list(dict_mod) - rm = RunMonitoring(modules_to_run, self.wsc) - rm.start() + ready_to_launch = True + if ready_to_launch: + rm = RunMonitoring(modules_to_run, self.wsc) + rm.start() + ready_to_launch = False time.sleep(1) @@ -81,6 +85,8 @@ class RunMonitoring(threading.Thread): self.wsc = wsc def run(self): + print "running" + sys.stdout.flush() for dict_mod in self.list_dict_mod: print "Launching " + str(dict_mod['os']) + "." + str(dict_mod['mod_name']) + " on " + str(dict_mod['addr']) sys.stdout.flush() -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.