Commit de5c3aa0 authored by Jerome Mariette's avatar Jerome Mariette
Browse files

add an option to limit the number of job to submit in parallel

parent 5c5c398e
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
batch_system_type = local batch_system_type = local
# add these options to all batch submit files # add these options to all batch submit files
batch_options = batch_options =
# add these options to limit the number of jobs sumitted in parallel
limit_submission = 100
# on which socket host should run the web server # on which socket host should run the web server
server_socket_host = 127.0.0.1 server_socket_host = 127.0.0.1
# on which socket port should run the web server # on which socket port should run the web server
......
...@@ -76,7 +76,8 @@ class JFlowConfigReader(object): ...@@ -76,7 +76,8 @@ class JFlowConfigReader(object):
try: try:
type = self.reader.get("global", "batch_system_type") type = self.reader.get("global", "batch_system_type")
options = self.reader.get("global", "batch_options") options = self.reader.get("global", "batch_options")
return [type, options] limit_submission = self.reader.get("global", "limit_submission")
return [type, options, limit_submission]
except NoOptionError, e: except NoOptionError, e:
return None return None
......
...@@ -84,7 +84,8 @@ class Workflow(threading.Thread): ...@@ -84,7 +84,8 @@ class Workflow(threading.Thread):
self.component_nameids = {} self.component_nameids = {}
# try to parse engine arguments # try to parse engine arguments
try: try:
type, options = self.jflow_config_reader.get_batch() type, options, limit_submission = self.jflow_config_reader.get_batch()
if limit_submission : self.engine_arguments += ' -J ' + str(limit_submission)
if type: self.engine_arguments += ' -T ' + type if type: self.engine_arguments += ' -T ' + type
if options : self.engine_arguments += ' -B "' + options + '"' if options : self.engine_arguments += ' -B "' + options + '"'
except: self.engine_arguments = None except: self.engine_arguments = None
......
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