Add job to clean dead links
This commit is contained in:
17
config/environment.rb
Normal file
17
config/environment.rb
Normal 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
|
@@ -72,6 +72,7 @@ module Adamantium
|
||||
|
||||
get "/bookmarks", to: "bookmarks.index"
|
||||
delete "/bookmarks/:id", to: "bookmarks.delete"
|
||||
post "/bookmarks/clean", to: "bookmarks.clean"
|
||||
post "/bookmarks/cache/:id", to: "bookmarks.cache"
|
||||
post "/bookmarks/:id/archive", to: "bookmarks.archive"
|
||||
|
||||
|
Reference in New Issue
Block a user