Class: JobArtifactUploader

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

Constant Summary collapse

ObjectNotReadyError =
Class.new(StandardError)
UnknownFileLocationError =
Class.new(StandardError)

Instance Method Summary collapse

Methods included from Workhorse::UploadPath

workhorse_upload_path

Methods included from ObjectStorage::Concern

#cache!, #delete_migrated_file, #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?, #schedule_background_upload, #store!, #store_dirs, #upload_paths, #use_file

Methods inherited from GitlabUploader

absolute_path, base_dir, #cache_dir, #exists?, #file_cache_storage?, file_storage?, #filename, #initialize, #local_url, #model_valid?, #move_to_cache, #move_to_store, #open, #relative_path, #replace_file_without_saving!, root, storage_options, #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