Skip to content

Commit fb3884e

Browse files
committed
enh: config controls sleep duration between submission polls
1 parent ccc4166 commit fb3884e

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

doc/users/config_file.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ Execution
120120
characters will be replaced by their hash. (possible values: ``true`` and
121121
``false``; default value: ``true``)
122122

123+
*poll_sleep_duration*
124+
This controls how long the job submission loop will sleep between submitting
125+
all pending jobs and checking for job completion. To be nice to cluster
126+
schedulers the default is set to 60 seconds.
127+
123128
Example
124129
~~~~~~~
125130

nipype/pipeline/plugins/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def run(self, graph, config, updatehash=False):
263263
slots=slots, graph=graph)
264264
else:
265265
logger.debug('Not submitting')
266-
sleep(2)
266+
sleep(float(self._config['execution']['poll_sleep_duration']))
267267
self._remove_node_dirs()
268268
report_nodes_not_run(notrun)
269269

nipype/utils/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
stop_on_unknown_version = false
4949
write_provenance = false
5050
parameterize_dirs = true
51+
poll_sleep_duration = 60
5152
5253
[check]
5354
interval = 1209600

0 commit comments

Comments
 (0)