Class: PagesDeployment
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- PagesDeployment
- Includes:
- EachBatch, FileStoreMounter, Gitlab::Utils::StrongMemoize
- Defined in:
- app/models/pages_deployment.rb
Overview
PagesDeployment stores a zip archive containing GitLab Pages web-site
Constant Summary collapse
- MIGRATED_FILE_NAME =
"_migrated.zip"
Constants included from FileStoreMounter
FileStoreMounter::ALLOWED_FILE_FIELDS
Constants inherited from ApplicationRecord
Constants included from ResetOnUnionError
ResetOnUnionError::MAX_RESET_PERIOD
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ApplicationRecord
cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
Methods included from SensitiveSerializableHash
Class Method Details
.deactivate_deployments_older_than(deployment, time: nil) ⇒ Object
38 39 40 41 42 43 44 |
# File 'app/models/pages_deployment.rb', line 38 def self.deactivate_deployments_older_than(deployment, time: nil) now = Time.now.utc active .older_than(deployment.id) .where(project_id: deployment.project_id, path_prefix: deployment.path_prefix) .update_all(updated_at: now, deleted_at: time || now) end |
Instance Method Details
#migrated? ⇒ Boolean
46 47 48 |
# File 'app/models/pages_deployment.rb', line 46 def migrated? file.filename == MIGRATED_FILE_NAME end |