File tree Expand file tree Collapse file tree 4 files changed +13
-3
lines changed
Expand file tree Collapse file tree 4 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ Next release
5858* ENH: Added -newgrid input to Warp in AFNI (3dWarp wrapper) (https://github.com/nipy/nipype/pull/1128)
5959* FIX: Fixed AFNI Copy interface to use positional inputs as required (https://github.com/nipy/nipype/pull/1131)
6060* ENH: Added a check in Dcm2nii to check if nipype created the config.ini file and remove if true (https://github.com/nipy/nipype/pull/1132)
61+ * ENH: Use a while loop to wait for Xvfb (up to a max wait time "xvfb_max_wait" in config file, default 10)
62+ (https://github.com/nipy/nipype/pull/1142)
6163
6264Release 0.10.0 (October 10, 2014)
6365============
Original file line number Diff line number Diff line change @@ -125,6 +125,9 @@ Execution
125125 all pending jobs and checking for job completion. To be nice to cluster
126126 schedulers the default is set to 60 seconds.
127127
128+ *xvfb_max_wait *
129+ Maximum time (in seconds) to wait for Xvfb to start, if the _redirect_x parameter of an Interface is True.
130+
128131Example
129132~~~~~~~
130133
Original file line number Diff line number Diff line change @@ -994,9 +994,13 @@ def run(self, **inputs):
994994 xvfb_proc = subprocess .Popen (xvfb_cmd ,
995995 stdout = open (os .devnull ),
996996 stderr = open (os .devnull ))
997- time .sleep (0.2 ) # give Xvfb time to start
998- if xvfb_proc .poll () is not None :
999- raise Exception ('Error: Xvfb did not start' )
997+ wait_step = 0.2
998+ wait_time = 0
999+ while xvfb_proc .poll () is not None :
1000+ if wait_time > config .get ('execution' , 'xvfb_max_wait' ):
1001+ raise Exception ('Error: Xvfb did not start' )
1002+ time .sleep (wait_step ) # give Xvfb time to start
1003+ wait_time += wait_step
10001004
10011005 runtime .environ ['DISPLAY' ] = ':%s' % vdisplay_num
10021006
Original file line number Diff line number Diff line change 5151write_provenance = false
5252parameterize_dirs = true
5353poll_sleep_duration = 60
54+ xvfb_max_wait = 10
5455
5556[check]
5657interval = 1209600
You can’t perform that action at this time.
0 commit comments