diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2017-12-08 12:09:06 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-02-28 22:45:07 +0300 |
commit | 87f11d2cf539d9539b439b54355f0dadaf4ebf76 (patch) | |
tree | 389f5bb28aabfe6a189795fa91611318bb272101 /app/uploaders | |
parent | 6ca02a41500790b3e9061dd8836540955b9aaf7c (diff) |
Merge branch 'zj-auto-upload-job-artifacts' into 'master'
Transfer job archives after creation
See merge request gitlab-org/gitlab-ee!3646
Diffstat (limited to 'app/uploaders')
-rw-r--r-- | app/uploaders/lfs_object_uploader.rb | 1 | ||||
-rw-r--r-- | app/uploaders/object_store_uploader.rb | 11 |
2 files changed, 7 insertions, 5 deletions
diff --git a/app/uploaders/lfs_object_uploader.rb b/app/uploaders/lfs_object_uploader.rb index 88cf0450dcd..fa42e4710b7 100644 --- a/app/uploaders/lfs_object_uploader.rb +++ b/app/uploaders/lfs_object_uploader.rb @@ -1,6 +1,5 @@ class LfsObjectUploader < ObjectStoreUploader storage_options Gitlab.config.lfs - after :store, :schedule_migration_to_object_storage def self.local_store_path Gitlab.config.lfs.storage_path diff --git a/app/uploaders/object_store_uploader.rb b/app/uploaders/object_store_uploader.rb index b5de0357a5f..bb25dc4219f 100644 --- a/app/uploaders/object_store_uploader.rb +++ b/app/uploaders/object_store_uploader.rb @@ -116,10 +116,13 @@ class ObjectStoreUploader < GitlabUploader end end - def schedule_migration_to_object_storage(new_file) - if self.class.object_store_enabled? && licensed? && file_storage? - ObjectStorageUploadWorker.perform_async(self.class.name, model.class.name, mounted_as, model.id) - end + def schedule_migration_to_object_storage(*args) + return unless self.class.object_store_enabled? + return unless self.class.background_upload_enabled? + return unless self.licensed? + return unless self.file_storage? + + ObjectStorageUploadWorker.perform_async(self.class.name, model.class.name, mounted_as, model.id) end def fog_directory |