[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 24/33] tcl daemons: make db-reopen actually work
Even if the refcount is >0, we want to actually reconnect. Also, log something if the close fails. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- tcl/JobDB-Executive.tcl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index 1763b69..6c7e067 100644 --- a/tcl/JobDB-Executive.tcl +++ b/tcl/JobDB-Executive.tcl @@ -125,9 +125,12 @@ proc db-ensure-closed {} { } proc db-reopen {} { + variable dbusers logputs stdout "** reopening database **" - catch { db-close } - db-open + if {[catch { db-ensure-closed } emsg]} { + logputs stdout "(db disconnect: $emsg)" + } + if {$dbusers > 0} db-ensure-open } proc db-update-1 {stmt} { -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |