mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 09:47:17 +00:00
Merge branch 'newModuleInformation' into production
This commit is contained in:
commit
d6e02591af
1 changed files with 16 additions and 8 deletions
|
@ -627,8 +627,7 @@ def fetchQueueData():
|
||||||
if int(card) > 0:
|
if int(card) > 0:
|
||||||
# Queue need to be killed
|
# Queue need to be killed
|
||||||
if int((datetime.datetime.now() - startTime_readable).total_seconds()) > args.treshold:
|
if int((datetime.datetime.now() - startTime_readable).total_seconds()) > args.treshold:
|
||||||
log(([str(time.time()), queue, "-", "ST:"+str(timestamp)+" PT:"+str(time.time()-float(timestamp))], 0), True)
|
log(([str(time.time()), queue, "-", "ST:"+str(timestamp)+" PT:"+str(time.time()-float(timestamp))], 0), True, show_in_board=False)
|
||||||
#log.write(json.dumps([queue, card, str(startTime_readable), str(processed_time_readable), path]) + "\n")
|
|
||||||
try:
|
try:
|
||||||
last_kill_try = time.time() - lastTimeKillCommand[moduleNum]
|
last_kill_try = time.time() - lastTimeKillCommand[moduleNum]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
@ -718,7 +717,8 @@ def format_string(tab, padding_row):
|
||||||
printstring.append( (text, the_pid) )
|
printstring.append( (text, the_pid) )
|
||||||
return printstring
|
return printstring
|
||||||
|
|
||||||
def log(data, write_on_disk=False):
|
def log(data, write_on_disk=False, show_in_board=True):
|
||||||
|
if show_in_board:
|
||||||
printarrayLog.insert(0, data)
|
printarrayLog.insert(0, data)
|
||||||
printarrayLog.pop()
|
printarrayLog.pop()
|
||||||
if write_on_disk:
|
if write_on_disk:
|
||||||
|
@ -799,10 +799,18 @@ if __name__ == "__main__":
|
||||||
module_file_array = set()
|
module_file_array = set()
|
||||||
no_info_modules = {}
|
no_info_modules = {}
|
||||||
path_allmod = os.path.join(os.environ['AIL_HOME'], 'doc/all_modules.txt')
|
path_allmod = os.path.join(os.environ['AIL_HOME'], 'doc/all_modules.txt')
|
||||||
|
|
||||||
|
try:
|
||||||
|
with open(path_allmod, 'r') as module_file:
|
||||||
|
for line in module_file:
|
||||||
|
module_file_array.add(line[:-1])
|
||||||
|
except IOError as e:
|
||||||
|
if e.errno == 2: #module_file not found, creating a new one
|
||||||
|
print(path_allmod + " not found.\nCreating a new one.")
|
||||||
|
os.system("./../doc/generate_modules_data_flow_graph.sh")
|
||||||
with open(path_allmod, 'r') as module_file:
|
with open(path_allmod, 'r') as module_file:
|
||||||
for line in module_file:
|
for line in module_file:
|
||||||
module_file_array.add(line[:-1])
|
module_file_array.add(line[:-1])
|
||||||
|
|
||||||
cleanRedis()
|
cleanRedis()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue