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
58
58
* ENH: Added -newgrid input to Warp in AFNI (3dWarp wrapper) (https://github.com/nipy/nipype/pull/1128)
59
59
* FIX: Fixed AFNI Copy interface to use positional inputs as required (https://github.com/nipy/nipype/pull/1131)
60
60
* 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)
61
63
62
64
Release 0.10.0 (October 10, 2014)
63
65
============
Original file line number Diff line number Diff line change @@ -125,6 +125,9 @@ Execution
125
125
all pending jobs and checking for job completion. To be nice to cluster
126
126
schedulers the default is set to 60 seconds.
127
127
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
+
128
131
Example
129
132
~~~~~~~
130
133
Original file line number Diff line number Diff line change @@ -994,9 +994,13 @@ def run(self, **inputs):
994
994
xvfb_proc = subprocess .Popen (xvfb_cmd ,
995
995
stdout = open (os .devnull ),
996
996
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
1000
1004
1001
1005
runtime .environ ['DISPLAY' ] = ':%s' % vdisplay_num
1002
1006
Original file line number Diff line number Diff line change 51
51
write_provenance = false
52
52
parameterize_dirs = true
53
53
poll_sleep_duration = 60
54
+ xvfb_max_wait = 10
54
55
55
56
[check]
56
57
interval = 1209600
You can’t perform that action at this time.
0 commit comments