Use Resque.inline instead of custom code [ci skip]
This commit is contained in:
parent
0e0d40d00e
commit
60ff88c1e7
1 changed files with 2 additions and 11 deletions
|
|
@ -11,21 +11,12 @@ if !AppConfig.single_process_mode?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Single process-mode hooks using Resque.inline
|
||||||
if AppConfig.single_process_mode?
|
if AppConfig.single_process_mode?
|
||||||
if Rails.env == 'production'
|
if Rails.env == 'production'
|
||||||
puts "WARNING: You are running Diaspora in production without Resque workers turned on. Please don't do this."
|
puts "WARNING: You are running Diaspora in production without Resque workers turned on. Please don't do this."
|
||||||
end
|
end
|
||||||
module Resque
|
Resque.inline = true
|
||||||
def enqueue(klass, *args)
|
|
||||||
begin
|
|
||||||
klass.send(:perform, *args)
|
|
||||||
rescue Exception => e
|
|
||||||
Rails.logger.warn(e.message)
|
|
||||||
raise e
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if AppConfig[:airbrake_api_key].present?
|
if AppConfig[:airbrake_api_key].present?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue