Replace persistence.db with db.gateway.connection
This commit is contained in:
2
Rakefile
2
Rakefile
@@ -85,7 +85,7 @@ namespace :blog do
|
|||||||
require "hanami/prepare"
|
require "hanami/prepare"
|
||||||
require "que"
|
require "que"
|
||||||
|
|
||||||
Que.connection = Adamantium::Container["persistence.db"]
|
Que.connection = Adamantium::Container["db.gateway"].connection
|
||||||
Adamantium::Jobs::ArchiveDeletedWebmentions.enqueue
|
Adamantium::Jobs::ArchiveDeletedWebmentions.enqueue
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@ module Admin
|
|||||||
module Bookmarks
|
module Bookmarks
|
||||||
class Clean < Action
|
class Clean < Action
|
||||||
def handle(req, res)
|
def handle(req, res)
|
||||||
Que.connection = Adamantium::Container["persistence.db"]
|
Que.connection = Adamantium::Container["db.gateway"].connection
|
||||||
|
|
||||||
res.status = 200
|
res.status = 200
|
||||||
if Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::ArchiveDeadBookmarks.name }
|
if Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::ArchiveDeadBookmarks.name }
|
||||||
|
@@ -19,7 +19,7 @@ module Admin
|
|||||||
end
|
end
|
||||||
|
|
||||||
expose :running_jobs do
|
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 }
|
Que.job_stats.any? { |job| job[:job_class] == Adamantium::Jobs::ArchiveDeadBookmarks.name }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -8,7 +8,7 @@ module Micropub
|
|||||||
include Deps["settings", "post_utilities.link_finder"]
|
include Deps["settings", "post_utilities.link_finder"]
|
||||||
|
|
||||||
def call(post_content:, post_url:, in_reply_to:)
|
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)
|
Adamantium::Jobs::SendWebMentions.enqueue(post_content: post_content, post_url: post_url, in_reply_to: in_reply_to)
|
||||||
end
|
end
|
||||||
|
@@ -8,11 +8,11 @@ module Test
|
|||||||
end
|
end
|
||||||
|
|
||||||
def rom
|
def rom
|
||||||
Hanami.app["persistence.rom"]
|
Hanami.app["db.rom"]
|
||||||
end
|
end
|
||||||
|
|
||||||
def db
|
def db
|
||||||
Hanami.app["persistence.db"]
|
Hanami.app["db.gateway"].connection
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user