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
|
||||
|
||||
# Single process-mode hooks using Resque.inline
|
||||
if AppConfig.single_process_mode?
|
||||
if Rails.env == 'production'
|
||||
puts "WARNING: You are running Diaspora in production without Resque workers turned on. Please don't do this."
|
||||
end
|
||||
module Resque
|
||||
def enqueue(klass, *args)
|
||||
begin
|
||||
klass.send(:perform, *args)
|
||||
rescue Exception => e
|
||||
Rails.logger.warn(e.message)
|
||||
raise e
|
||||
nil
|
||||
end
|
||||
end
|
||||
end
|
||||
Resque.inline = true
|
||||
end
|
||||
|
||||
if AppConfig[:airbrake_api_key].present?
|
||||
|
|
|
|||
Loading…
Reference in a new issue