Commit 91276b04 authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix find of errors in cluster mode + send mail on prepare fail

parent 97d7523e
......@@ -46,7 +46,7 @@ def index_fasta(name, filepath, out_dir, type_f, dofilter = True):
os.remove(uncompressed)
else:
print("###ERR## Error while indexing %s file: %s" % (type_f, error), file=sys.stderr)
print("###ERR### Error while indexing %s file: %s" % (type_f, error), file=sys.stderr)
if uncompressed is not None:
try:
os.remove(uncompressed)
......@@ -97,7 +97,7 @@ with open(args.preptime_file, "w") as ptime:
replace_fa=True)
filter_f.filter()
else:
print("###ERR## Error while loading query file: %s" % error, file=sys.stderr)
print("###ERR### Error while loading query file: %s" % error, file=sys.stderr)
exit(1)
else:
print("Indexing query...")
......
......@@ -819,12 +819,15 @@ class JobManager:
"-n", self.query.get_name()]
if self.tool.split_before:
args.append("--split")
return self.launch_to_cluster(step="prepare",
batch_system_type=batch_system_type,
command=self.config.cluster_python_exec,
args=args,
log_out=self.logs,
log_err=self.logs)
success = self.launch_to_cluster(step="prepare",
batch_system_type=batch_system_type,
command=self.config.cluster_python_exec,
args=args,
log_out=self.logs,
log_err=self.logs)
if not success and MODE == "webserver" and self.config.send_mail_status:
self.send_mail_post()
return success
def prepare_data_local(self):
with open(self.preptime_file, "w") as ptime, Job.connect():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment