Commit f8269aea authored by Gerald Salin's avatar Gerald Salin
parents 5ab283f6 5ff4abd0
......@@ -27,9 +27,16 @@ limit_submission = 100
server_socket_host = 127.0.0.1
# on which socket port should run the web server
server_socket_port = 8080
#server_socket_port = 8083
# date format
date_format = %d/%m/%Y
# data retention time (in years)
retention_time = 2
#optional : key for jflow server ssl configuration
ssl_certificate = certificate.crt
ssl_certificate_chain = certificate_chain.crt
ssl_private_key = private_key.key
[email]
# if you want an email to be sent at the end of the workflow execution
# set the smtp_server and the from_address values
......
......@@ -116,6 +116,12 @@ class JFlowConfigReader(object):
except:
return ["127.0.0.1", 8080]
def get_ssl_files(self):
try:
return [self.reader.get("global", "ssl_certificate"), self.reader.get("global", "ssl_certificate_chain"),self.reader.get("global", "ssl_private_key")]
except:
return []
def get_email_options(self):
try: smtps = self.reader.get("email", "smtp_server")
except: smtps = None
......
......@@ -140,6 +140,7 @@ class JFlowServer (object):
# define the socket host and port
jflowconf = JFlowConfigReader()
socket_opts = jflowconf.get_socket_options()
ssl_opts = jflowconf.get_ssl_files()
# add the result directory
if config is None or not '/' in config:
......@@ -162,6 +163,11 @@ class JFlowServer (object):
cherrypy.config.update({'server.socket_host': socket_opts[0],
'server.socket_port': socket_opts[1]})
if len(ssl_opts)==3:
cherrypy.config.update({'server.ssl_module': 'builtin',
'server.ssl_certificate': ssl_opts[0],
'server.ssl_certificate_chain': ssl_opts[1],
'server.ssl_private_key': ssl_opts[2]})
# start the server
cherrypy.quickstart(server_class(), config=config)
......
......@@ -78,6 +78,7 @@ class ConcatenateFilesGroups (Component):
for prefix in self.group_prefix:
logging.getLogger("ConcatenateFilesGroups").debug("process. prefix = " + prefix)
logging.getLogger("ConcatenateFilesGroups").debug("process. outputs_path[prefix] = " + ", ".join(outputs_path[prefix]))
logging.getLogger("ConcatenateFilesGroups").debug("process. concat_groups[prefix] = " + ", ".join(concat_groups[prefix]))
# Sort list of files to concatenate
concat_groups[prefix].sort()
......@@ -93,7 +94,12 @@ class ConcatenateFilesGroups (Component):
logging.getLogger("ConcatenateFilesGroups").debug("process. command = " + 'zcat ' + cmd_inputs_pattern + ' | '+self.get_exec_path("gzip")+' - > ${' + str(next_arg_number) + '}' + ", ".join(concat_groups[prefix]) + ", and ouput = "+", ".join(outputs_path[prefix]))
output = os.path.join(self.runobj.get_work_directory(),prefix+"."+".".join(os.path.basename(self.files_list[0]).split(".")[1:]))
out_files.append(output)
self.add_shell_execution('zcat ' + cmd_inputs_pattern + ' | '+self.get_exec_path("gzip")+' - > ${' + str(next_arg_number) + '}',
if len(concat_groups[prefix])==1:
self.add_shell_execution('cp ' + cmd_inputs_pattern + ' ${' + str(next_arg_number) + '}',
cmd_format='{EXE} {IN} {OUT}', map=False,
inputs = concat_groups[prefix], outputs = outputs_path[prefix])
else:
self.add_shell_execution('zcat ' + cmd_inputs_pattern + ' | '+self.get_exec_path("gzip")+' - > ${' + str(next_arg_number) + '}',
cmd_format='{EXE} {IN} {OUT}', map=False,
inputs = concat_groups[prefix], outputs = outputs_path[prefix])
# self.concat_files = out_files
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