diff options
Diffstat (limited to 'project2/json')
-rw-r--r-- | project2/json/couchSession.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/project2/json/couchSession.cpp b/project2/json/couchSession.cpp index ee7bad2..60acefa 100644 --- a/project2/json/couchSession.cpp +++ b/project2/json/couchSession.cpp @@ -2,8 +2,9 @@ #include "curlHelper.h" #include "safeMapFind.h" #include "exceptions.h" -#include "../libmisc/buffer.h" -#include "../libmisc/curlsup.h" +#include "logger.h" +#include "buffer.h" +#include "curlsup.h" #include <scriptLoader.h> #include <sessionContainer.h> #include <boost/bind.hpp> @@ -110,9 +111,14 @@ const Glib::ustring CouchSessionContainer::ExpiryKey("project2:expires"); class CustomCouchSessionLoader : public SessionContainerLoader::For<CouchSessionContainer> { public: - void onPeriodic() { - deleteSessions(); - compactDB(); + void onPeriodic() override { + try { + deleteSessions(); + compactDB(); + } + catch (...) { + Logger()->messagebf(LOG_WARNING, "Failed to purge expired sessions and compact DB"); + } } INITOPTIONS; |