2017-10-05 23:39:00 -04:00
|
|
|
require_dependency 'user'
|
|
|
|
|
2017-05-24 01:50:20 -04:00
|
|
|
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
|