Commit a6101523 authored by Luke Duncalfe's avatar Luke Duncalfe

Merge branch '342678-csv-issue-import-rate-limit' into 'master'

Don't attempt Issue rate liming for CSV imports

See merge request gitlab-org/gitlab!72260
parents 0ba36a02 ad8813f8
...@@ -71,7 +71,14 @@ module Issuable ...@@ -71,7 +71,14 @@ module Issuable
# NOTE: CSV imports are performed by workers, so we do not have a request context in order # 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. # to create a SpamParams object to pass to the issuable create service.
spam_params = nil 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 end
def email_results_to_user 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