Class: JobArtifactUploader

Inherits:
GitlabUploader
  • Object
show all
Extended by:
Workhorse::UploadPath
Includes:
ObjectStorage::CDN::Concern, ObjectStorage::Concern
Defined in:
app/uploaders/job_artifact_uploader.rb

Constant Summary collapse

UnknownFileLocationError =
Class.new(StandardError)

Constants inherited from GitlabUploader

GitlabUploader::ObjectNotReadyError, GitlabUploader::PROTECTED_METHODS

Instance Method Summary collapse

Methods included from Workhorse::UploadPath

workhorse_upload_path

Methods included from ObjectStorage::CDN::Concern

#cdn_enabled_url, #cdn_signed_url, #use_cdn?

Methods included from ObjectStorage::Concern

#cache!, #delete_migrated_file, #delete_tmp_file_after_storage, #direct_download_enabled?, #exclusive_lease_key, #exists?, #file_cache_storage?, #file_storage?, #filename, #filename=, #fog_attributes, #fog_credentials, #fog_directory, #fog_public, #migrate!, #object_store, #object_store=, #persist_object_store!, #persist_object_store?, #proxy_download_enabled?, #retrieve_from_store!, #store!, #store_dirs, #store_path, #upload_paths, #use_file, #use_open_file

Methods included from Gitlab::Utils::Override

#extended, extensions, #included, #method_added, #override, #prepended, #queue_verification, verify!

Methods inherited from GitlabUploader

absolute_path, base_dir, #cache_dir, #check_remote_file_existence_on_upload?, #empty_size?, #exists?, #file_cache_storage?, file_storage?, #filename, #initialize, #local_url, #model_valid?, #move_to_cache, #move_to_store, #multi_read, #open, #options, options, #relative_path, #replace_file_without_saving!, root, storage_location, #sync_model_object_store?, #url_or_file_path, version, #work_dir

Constructor Details

This class inherits a constructor from GitlabUploader

Instance Method Details

#cached_sizeObject



14
15
16
17
18
# File 'app/uploaders/job_artifact_uploader.rb', line 14

def cached_size
  return model.size if model.size.present? && !model.file_changed?

  size
end

#store_dirObject



20
21
22
# File 'app/uploaders/job_artifact_uploader.rb', line 20

def store_dir
  dynamic_segment
end