diff --git a/Rakefile b/Rakefile index 88f3bd7..dee2dae 100644 --- a/Rakefile +++ b/Rakefile @@ -85,7 +85,7 @@ namespace :blog do require "hanami/prepare" require "que" - Que.connection = Adamantium::Container["persistence.db"] + Que.connection = Adamantium::Container["db.gateway"].connection Adamantium::Jobs::ArchiveDeletedWebmentions.enqueue end diff --git a/slices/admin/actions/bookmarks/clean.rb b/slices/admin/actions/bookmarks/clean.rb index d5813cd..cce8e5e 100644 --- a/slices/admin/actions/bookmarks/clean.rb +++ b/slices/admin/actions/bookmarks/clean.rb @@ -5,7 +5,7 @@ module Admin module Bookmarks class Clean < Action def handle(req, res) - Que.connection = Adamantium::Container["persistence.db"] + Que.connection = Adamantium::Container["db.gateway"].connection res.status = 200 if Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::ArchiveDeadBookmarks.name } diff --git a/slices/admin/views/bookmarks/index.rb b/slices/admin/views/bookmarks/index.rb index ff5883a..4b5da37 100644 --- a/slices/admin/views/bookmarks/index.rb +++ b/slices/admin/views/bookmarks/index.rb @@ -19,7 +19,7 @@ module Admin end expose :running_jobs do - Que.connection = Adamantium::Container["persistence.db"] + Que.connection = Adamantium::Container["db.gateway"].connection Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::ArchiveDeadBookmarks.name } end end diff --git a/slices/micropub/commands/posts/send_webmentions.rb b/slices/micropub/commands/posts/send_webmentions.rb index bc6b3ba..bcec5b0 100644 --- a/slices/micropub/commands/posts/send_webmentions.rb +++ b/slices/micropub/commands/posts/send_webmentions.rb @@ -8,7 +8,7 @@ module Micropub include Deps["settings", "post_utilities.link_finder"] def call(post_content:, post_url:, in_reply_to:) - Que.connection = Adamantium::Container["persistence.db"] + Que.connection = Adamantium::Container["db.gateway"].connection Adamantium::Jobs::SendWebMentions.enqueue(post_content: post_content, post_url: post_url, in_reply_to: in_reply_to) end diff --git a/spec/support/db/helpers.rb b/spec/support/db/helpers.rb index c2eb130..cf5944c 100644 --- a/spec/support/db/helpers.rb +++ b/spec/support/db/helpers.rb @@ -8,11 +8,11 @@ module Test end def rom - Hanami.app["persistence.rom"] + Hanami.app["db.rom"] end def db - Hanami.app["persistence.db"] + Hanami.app["db.gateway"].connection end end end