You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
actionlogger.info('Stoping pipeline due to failure in stages with PID '+str(failingpids))
696
698
# self.analyse_files_and_connections()
699
+
self.cat_logfiles_tostdout(failingtasks)
700
+
697
701
self.stop_pipeline_and_exit(process_list)
698
702
699
703
# empty finished means we have to wait more
700
704
returnlen(finished)==0
701
705
706
+
defcat_logfiles_tostdout(self, taskids):
707
+
# In case of errors we can cat the logfiles for this taskname
708
+
# to stdout. Assuming convention that "taskname" translates to "taskname.log" logfile.
709
+
fortidintaskids:
710
+
taskspec=self.workflowspec['stages'][tid]
711
+
taskname=taskspec['name']
712
+
filename=taskname+'.log'
713
+
directory=taskspec['cwd']
714
+
path=directory+'/'+filename
715
+
ifos.path.exists(path):
716
+
print (' ----> START OF LOGFILE ', path, ' -----')
717
+
os.system('cat '+path)
718
+
print (' <---- END OF LOGFILE ', path, ' -----')
719
+
702
720
defanalyse_files_and_connections(self):
703
721
forp,sinself.pid_to_files.items():
704
722
forfins:
@@ -906,7 +924,10 @@ def execute(self):
906
924
907
925
parser.add_argument('--mem-limit', help='Set memory limit as scheduling constraint', default=max_system_mem)
908
926
parser.add_argument('--cpu-limit', help='Set CPU limit (core count)', default=8)
909
-
parser.add_argument('--cgroup', help='Execute pipeline under a given cgroup (e.g., 8coregrid) emulating resource constraints. This must exist and the tasks file must be writable to with the current user.')
927
+
parser.add_argument('--cgroup', help='Execute pipeline under a given cgroup (e.g., 8coregrid) emulating resource constraints. This m\
928
+
ust exist and the tasks file must be writable to with the current user.')
929
+
parser.add_argument('--stdout-on-failure', action='store_true', help='Print log files of failing tasks to stdout,')
0 commit comments