Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-30 15:07:06 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-30 15:07:06 +0300
commit7aa22e9a103b049dd2da70045a5822c51164f7db (patch)
treef741dded2bd2965e9e9b7ce4c680e2ddaf0aa3d3 /app/models
parent5c229c2ebe3304a58afd1d40418410a8c3723ea5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/appearance.rb1
-rw-r--r--app/models/bulk_imports/export_upload.rb1
-rw-r--r--app/models/ci/build.rb1
-rw-r--r--app/models/ci/job_artifact.rb1
-rw-r--r--app/models/concerns/avatarable.rb1
-rw-r--r--app/models/container_repository.rb19
-rw-r--r--app/models/import_export_upload.rb1
-rw-r--r--app/models/lfs_object.rb1
-rw-r--r--app/models/merge_request_diff.rb1
-rw-r--r--app/models/projects/import_export/relation_export_upload.rb1
10 files changed, 17 insertions, 11 deletions
diff --git a/app/models/appearance.rb b/app/models/appearance.rb
index bd948c2c32a..03fbf0d176c 100644
--- a/app/models/appearance.rb
+++ b/app/models/appearance.rb
@@ -3,7 +3,6 @@
class Appearance < ApplicationRecord
include CacheableAttributes
include CacheMarkdownField
- include ObjectStorage::BackgroundMove
include WithUploads
attribute :title, default: ''
diff --git a/app/models/bulk_imports/export_upload.rb b/app/models/bulk_imports/export_upload.rb
index a9cba5119af..4304032b28c 100644
--- a/app/models/bulk_imports/export_upload.rb
+++ b/app/models/bulk_imports/export_upload.rb
@@ -3,7 +3,6 @@
module BulkImports
class ExportUpload < ApplicationRecord
include WithUploads
- include ObjectStorage::BackgroundMove
self.table_name = 'bulk_import_export_uploads'
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 9ad1331b948..40b46a3a342 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -7,7 +7,6 @@ module Ci
include Ci::Contextable
include TokenAuthenticatable
include AfterCommitQueue
- include ObjectStorage::BackgroundMove
include Presentable
include Importable
include Ci::HasRef
diff --git a/app/models/ci/job_artifact.rb b/app/models/ci/job_artifact.rb
index 922806a21c3..af233609a3b 100644
--- a/app/models/ci/job_artifact.rb
+++ b/app/models/ci/job_artifact.rb
@@ -5,7 +5,6 @@ module Ci
include Ci::Partitionable
include IgnorableColumns
include AfterCommitQueue
- include ObjectStorage::BackgroundMove
include UpdateProjectStatistics
include UsageStatistics
include Sortable
diff --git a/app/models/concerns/avatarable.rb b/app/models/concerns/avatarable.rb
index b32502c3ee2..f419fa8518e 100644
--- a/app/models/concerns/avatarable.rb
+++ b/app/models/concerns/avatarable.rb
@@ -16,7 +16,6 @@ module Avatarable
included do
prepend ShadowMethods
- include ObjectStorage::BackgroundMove
include Gitlab::Utils::StrongMemoize
include ApplicationHelper
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb
index 7da4e31b472..db0fcd915b3 100644
--- a/app/models/container_repository.rb
+++ b/app/models/container_repository.rb
@@ -98,6 +98,8 @@ class ContainerRepository < ApplicationRecord
)
end
+ before_update :set_status_updated_at_to_now, if: :status_changed?
+
state_machine :migration_state, initial: :default, use_transactions: false do
state :pre_importing do
validates :migration_pre_import_started_at, presence: true
@@ -521,11 +523,20 @@ class ContainerRepository < ApplicationRecord
end
def set_delete_ongoing_status
- update_columns(status: :delete_ongoing, delete_started_at: Time.zone.now)
+ now = Time.zone.now
+ update_columns(
+ status: :delete_ongoing,
+ delete_started_at: now,
+ status_updated_at: now
+ )
end
def set_delete_scheduled_status
- update_columns(status: :delete_scheduled, delete_started_at: nil)
+ update_columns(
+ status: :delete_scheduled,
+ delete_started_at: nil,
+ status_updated_at: Time.zone.now
+ )
end
def migration_in_active_state?
@@ -623,6 +634,10 @@ class ContainerRepository < ApplicationRecord
tag
end
end
+
+ def set_status_updated_at_to_now
+ self.status_updated_at = Time.zone.now
+ end
end
ContainerRepository.prepend_mod_with('ContainerRepository')
diff --git a/app/models/import_export_upload.rb b/app/models/import_export_upload.rb
index bc363cce8dd..bdb53653637 100644
--- a/app/models/import_export_upload.rb
+++ b/app/models/import_export_upload.rb
@@ -2,7 +2,6 @@
class ImportExportUpload < ApplicationRecord
include WithUploads
- include ObjectStorage::BackgroundMove
belongs_to :project
belongs_to :group
diff --git a/app/models/lfs_object.rb b/app/models/lfs_object.rb
index 8aa48561e60..e1f28c0e117 100644
--- a/app/models/lfs_object.rb
+++ b/app/models/lfs_object.rb
@@ -4,7 +4,6 @@ class LfsObject < ApplicationRecord
include AfterCommitQueue
include Checksummable
include EachBatch
- include ObjectStorage::BackgroundMove
include FileStoreMounter
has_many :lfs_objects_projects
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb
index 08c56131d78..40b2a8d16be 100644
--- a/app/models/merge_request_diff.rb
+++ b/app/models/merge_request_diff.rb
@@ -6,7 +6,6 @@ class MergeRequestDiff < ApplicationRecord
include ManualInverseAssociation
include EachBatch
include Gitlab::Utils::StrongMemoize
- include ObjectStorage::BackgroundMove
include BulkInsertableAssociations
# Don't display more than 100 commits at once
diff --git a/app/models/projects/import_export/relation_export_upload.rb b/app/models/projects/import_export/relation_export_upload.rb
index 965dc39d19f..12cfb3415d8 100644
--- a/app/models/projects/import_export/relation_export_upload.rb
+++ b/app/models/projects/import_export/relation_export_upload.rb
@@ -4,7 +4,6 @@ module Projects
module ImportExport
class RelationExportUpload < ApplicationRecord
include WithUploads
- include ObjectStorage::BackgroundMove
self.table_name = 'project_relation_export_uploads'