Use sub over gsub since we only want to remove one instance

parent 90699692
...@@ -94,7 +94,7 @@ class GeoFileDownloadDispatchWorker ...@@ -94,7 +94,7 @@ class GeoFileDownloadDispatchWorker
.order(created_at: :desc) .order(created_at: :desc)
.limit(limit) .limit(limit)
.pluck(:id, :uploader) .pluck(:id, :uploader)
.map { |id, uploader| [id, uploader.gsub('Uploader', '').downcase] } .map { |id, uploader| [id, uploader.sub(/Uploader\z/, '').downcase] }
end end
def find_lfs_object_ids(limit) def find_lfs_object_ids(limit)
......
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