diff options
-rw-r--r-- | p2pvr/daemon/maintenance/events.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/p2pvr/daemon/maintenance/events.cpp b/p2pvr/daemon/maintenance/events.cpp index fbdeb51..30e0a83 100644 --- a/p2pvr/daemon/maintenance/events.cpp +++ b/p2pvr/daemon/maintenance/events.cpp @@ -84,7 +84,7 @@ MaintenanceI::UpdateEvents(const Ice::Current & ice) SiEventsStream stream(ice, dbc.get(), logger); - DB::TransactionScope tx(dbc.get()); + auto tx = std::make_unique<DB::TransactionScope>(dbc.get()); DB::TablePatch tp; tp.dest = "events"; tp.insteadOfDelete = new DB::StaticSqlWriter("current = false"); @@ -93,6 +93,7 @@ MaintenanceI::UpdateEvents(const Ice::Current & ice) sql::maintenance::pruneEvents.modify(dbc.get())->execute(); + tx = nullptr; logger->messagebf(LOG::INFO, "%s: Updated events", __PRETTY_FUNCTION__); auto sch = SchedulesPrx::checkedCast(ice.adapter->createProxy(ic->stringToIdentity("Schedules"))); |