8 namespace persistency {
15 std::vector<std::tuple<cond::Time_t, boost::posix_time::ptime, boost::posix_time::ptime> >
runBuffer;
16 std::vector<std::tuple<cond::Time_t, boost::posix_time::ptime, boost::posix_time::ptime> >
updateBuffer;
43 return m_session->runInfoSchema().runInfoTable().getLastInserted();
49 const boost::posix_time::ptime&
start,
50 const boost::posix_time::ptime&
end) {
56 const boost::posix_time::ptime&
start,
57 const boost::posix_time::ptime&
end) {
70 boost::posix_time::ptime& newRunStart = std::get<1>(
update);
71 boost::posix_time::ptime& newRunEnd = std::get<2>(
update);
72 boost::posix_time::ptime existingRunStart;
73 boost::posix_time::ptime existingRunEnd;
74 if (
m_session->runInfoSchema().runInfoTable().select(newRun, existingRunStart, existingRunEnd)) {
75 if (newRunStart != existingRunStart) {
76 std::stringstream
msg;
77 msg <<
"Attempt to update start time of existing run " << newRun;
80 if (existingRunEnd == newRunEnd) {
84 if (existingRunEnd != existingRunStart) {
85 std::stringstream
msg;
86 msg <<
"Attempt to update end time of existing run " << newRun;
90 m_session->runInfoSchema().runInfoTable().updateEnd(newRun, newRunEnd);
92 m_session->runInfoSchema().runInfoTable().insertOne(newRun, newRunStart, newRunEnd);
97 m_data->updateBuffer.clear();
105 if (!
m_session->isTransactionActive(
false))