summaryrefslogtreecommitdiff
path: root/lib/rbot
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot')
-rw-r--r--lib/rbot/registry/bdb.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/rbot/registry/bdb.rb b/lib/rbot/registry/bdb.rb
index 5acfe491..4457a369 100644
--- a/lib/rbot/registry/bdb.rb
+++ b/lib/rbot/registry/bdb.rb
@@ -146,6 +146,10 @@ module Irc
end
def DBTree.cleanup_logs()
+ if @@env.nil?
+ debug "No BDB environment, skipping checkpoint"
+ return
+ end
begin
debug "DBTree: checkpointing ..."
@@env.checkpoint
@@ -166,6 +170,10 @@ module Irc
end
def DBTree.stats()
+ if @@env.nil?
+ debug "No BDB environment, no stats"
+ return
+ end
begin
debug "General stats:"
debug @@env.stat
@@ -181,6 +189,10 @@ module Irc
end
def DBTree.cleanup_env()
+ if @@env.nil?
+ debug "No BDB environment, skipping cleanup"
+ return
+ end
begin
debug "DBTree: checking transactions ..."
has_active_txn = @@env.txn_stat["st_nactive"] > 0