add targeted post down voting report, add delayed job plugin to disable statement timeout
This commit is contained in:
@@ -1,2 +1,13 @@
|
||||
require 'delayed/plugin'
|
||||
|
||||
class DelayedJobTimeoutPlugin < ::Delayed::Plugin
|
||||
callbacks do |lifecycle|
|
||||
lifecycle.before(:execute) do |job|
|
||||
job.class.connection.execute "set statement_timeout = 0"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Delayed::Worker.default_queue_name = "default"
|
||||
Delayed::Worker.destroy_failed_jobs = false
|
||||
Delayed::Worker.plugins << DelayedJobTimeoutPlugin
|
||||
|
||||
@@ -243,6 +243,8 @@ Rails.application.routes.draw do
|
||||
get "reports/upload_tags" => "reports#upload_tags"
|
||||
get "reports/post_versions" => "reports#post_versions"
|
||||
post "reports/post_versions_create" => "reports#post_versions_create"
|
||||
get "reports/down_voting_post" => "reports#down_voting_post"
|
||||
post "reports/down_voting_post_create" => "reports#down_voting_post_create"
|
||||
resources :saved_searches, :except => [:show] do
|
||||
collection do
|
||||
get :labels
|
||||
|
||||
Reference in New Issue
Block a user