[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 18/33] ms-ownerdaemon: Break out db-reopen, and move it to JobDB-Executive
Also, change the `puts' to a `logputs'. No other functional change. Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> --- ms-ownerdaemon | 4 +--- tcl/JobDB-Executive.tcl | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ms-ownerdaemon b/ms-ownerdaemon index 62ca645..31e6fdd 100755 --- a/ms-ownerdaemon +++ b/ms-ownerdaemon @@ -70,9 +70,7 @@ proc record-dead-tasks {} { proc record-dead-tasks-retry {} { after idle record-dead-tasks - puts "** reconnecting/retrying **" - catch { jobdb::db-close } - jobdb::db-open + jobdb::db-reopen } proc await-endings-notify {} { diff --git a/tcl/JobDB-Executive.tcl b/tcl/JobDB-Executive.tcl index 63db4f0..29ab59a 100644 --- a/tcl/JobDB-Executive.tcl +++ b/tcl/JobDB-Executive.tcl @@ -109,6 +109,12 @@ proc db-close {} { pg_disconnect dbh } +proc db-reopen {} { + logputs stdout "** reopening database **" + catch { db-close } + db-open +} + proc db-update-1 {stmt} { # must be in transaction set nrows [db-execute $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 |