Commit 3f75ee4f authored by Michael Kozono's avatar Michael Kozono

Merge branch 'da-remove-check-file-store-being-null' into 'master'

Geo - Improve query to retrieve Job Artifacts, LFS Objects, and Uploads with files stored locally

See merge request gitlab-org/gitlab!24891
parents b3ef8386 bb808d0b
...@@ -4,7 +4,7 @@ module ObjectStorable ...@@ -4,7 +4,7 @@ module ObjectStorable
extend ActiveSupport::Concern extend ActiveSupport::Concern
included do included do
scope :with_files_stored_locally, -> { where(klass::STORE_COLUMN => [nil, ObjectStorage::Store::LOCAL]) } scope :with_files_stored_locally, -> { where(klass::STORE_COLUMN => ObjectStorage::Store::LOCAL) }
scope :with_files_stored_remotely, -> { where(klass::STORE_COLUMN => ObjectStorage::Store::REMOTE) } scope :with_files_stored_remotely, -> { where(klass::STORE_COLUMN => ObjectStorage::Store::REMOTE) }
end end
end end
...@@ -11,8 +11,6 @@ module EE ...@@ -11,8 +11,6 @@ module EE
STORE_COLUMN = :file_store STORE_COLUMN = :file_store
prepended do prepended do
include ObjectStorable
after_destroy :log_geo_deleted_event after_destroy :log_geo_deleted_event
scope :project_id_in, ->(ids) { joins(:projects).merge(::Project.id_in(ids)) } scope :project_id_in, ->(ids) { joins(:projects).merge(::Project.id_in(ids)) }
......
---
title: Geo - Improve query to retrieve Job Artifacts, LFS Objects, and Uploads with
files stored locally
merge_request: 24891
author:
type: performance
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