mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 03:33:39 +08:00
f3549291a3
This commit also cleans up a bunch of pointless noise each time we boot app - narrative was loading i18n cause redefinition of consts - discourse.rb was loaded twice as was auth - bin/unicorn now does all the smart things and boots unicron in dev - bin/rails s will boot unicorn with no params - remove bin/puma which only causes confusion
16 lines
333 B
Ruby
16 lines
333 B
Ruby
require_dependency 'user'
|
|
|
|
module Jobs
|
|
class NarrativeInit < Jobs::Base
|
|
sidekiq_options queue: 'critical'
|
|
|
|
def execute(args)
|
|
if user = User.find_by(id: args[:user_id])
|
|
I18n.with_locale(user.effective_locale) do
|
|
args[:klass].constantize.new.input(:init, user)
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|