FIX: do not use scheduler for uploading csv file for invite

Since the bulk invite process already happens in a dedicated Sidekiq job
This commit is contained in:
Arpit Jalan 2018-07-04 12:40:56 +05:30
parent 7590128d38
commit b9835cc392
1 changed files with 10 additions and 12 deletions

View File

@ -165,7 +165,6 @@ class InvitesController < ApplicationController
name = params[:name] || File.basename(file.original_filename, ".*")
extension = File.extname(file.original_filename)
Scheduler::Defer.later("Upload CSV") do
begin
data = if extension.downcase == ".csv"
path = Invite.create_csv(file, name)
@ -178,7 +177,6 @@ class InvitesController < ApplicationController
failed_json.merge(errors: [I18n.t("bulk_invite.error")])
end
MessageBus.publish("/uploads/csv", data.as_json, user_ids: [current_user.id])
end
render json: success_json
end