Commit ad8813f8 authored by Ash McKenzie's avatar Ash McKenzie

Don't attempt Issue rate liming for CSV imports

parent a1ce1804
......@@ -71,7 +71,14 @@ module Issuable
# NOTE: CSV imports are performed by workers, so we do not have a request context in order
# to create a SpamParams object to pass to the issuable create service.
spam_params = nil
create_issuable_class.new(project: @project, current_user: @user, params: attributes, spam_params: spam_params).execute
create_service = create_issuable_class.new(project: @project, current_user: @user, params: attributes, spam_params: spam_params)
# For now, if create_issuable_class prepends RateLimitedService let's bypass rate limiting
if create_issuable_class < RateLimitedService
create_service.execute_without_rate_limiting
else
create_service.execute
end
end
def email_results_to_user
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment