Do not try to restart not running queue if autokill is not set

This commit is contained in:
Mokaddem 2016-11-25 16:00:46 +01:00
parent 4bf45eea36
commit d831a79614

View file

@ -247,7 +247,7 @@ if __name__ == "__main__":
printarray3.append([curr_queue, "No data"]) printarray3.append([curr_queue, "No data"])
else: else:
#If no info since long time, try to kill #If no info since long time, try to kill
if int(time.time()) - no_info_modules[curr_queue] > threshold_stucked_module: if args.autokill == 1 and int(time.time()) - no_info_modules[curr_queue] > threshold_stucked_module:
kill_module(curr_queue, None) kill_module(curr_queue, None)
no_info_modules[curr_queue] = int(time.time()) no_info_modules[curr_queue] = int(time.time())
printarray3.append([curr_queue, "Stuck or idle, restarting in " + str(threshold_stucked_module - (int(time.time()) - no_info_modules[curr_queue])) + "s"]) printarray3.append([curr_queue, "Stuck or idle, restarting in " + str(threshold_stucked_module - (int(time.time()) - no_info_modules[curr_queue])) + "s"])