lib/tobox/plugins/stats.rb in tobox-0.4.0 vs lib/tobox/plugins/stats.rb in tobox-0.4.1
- old
+ new
@@ -33,9 +33,11 @@
@error_handlers = Array(config.lifecycle_events[:error_worker])
@max_attempts = config[:max_attempts]
@db = Sequel.connect(config.database.opts.merge(single_threaded: true))
+ Array(config.lifecycle_events[:database_connect]).each { |cb| cb.call(@db) }
+
@outbox_table = config[:table]
@outbox_ds = @db[@outbox_table]
inbox_table = config[:inbox_table]
@inbox_ds = @db[inbox_table] if inbox_table