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:
parent
7590128d38
commit
b9835cc392
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue