Add job to clean dead links

This commit is contained in:
2023-05-08 21:57:32 +10:00
parent 96c23eafa6
commit ebdf051b82
9 changed files with 92 additions and 0 deletions

17
config/environment.rb Normal file
View File

@@ -0,0 +1,17 @@
require "uri"
require "pg"
require "connection_pool"
require "que"
require "hanami/boot"
uri = URI.parse(ENV['DATABASE_URL'])
Que.connection = ConnectionPool.new(size: 10) do
PG::Connection.open(
host: uri.host,
user: uri.user,
password: uri.password,
port: uri.port || 5432,
dbname: uri.path[1..-1]
)
end