diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /lib/gitlab/import | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'lib/gitlab/import')
-rw-r--r-- | lib/gitlab/import/database_helpers.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/import/set_async_jid.rb | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/gitlab/import/database_helpers.rb b/lib/gitlab/import/database_helpers.rb index aaade39dd62..f8ea7a7adcd 100644 --- a/lib/gitlab/import/database_helpers.rb +++ b/lib/gitlab/import/database_helpers.rb @@ -11,7 +11,7 @@ module Gitlab # We use bulk_insert here so we can bypass any queries executed by # callbacks or validation rules, as doing this wouldn't scale when # importing very large projects. - result = Gitlab::Database + result = Gitlab::Database # rubocop:disable Gitlab/BulkInsert .bulk_insert(relation.table_name, [attributes], return_ids: true) result.first diff --git a/lib/gitlab/import/set_async_jid.rb b/lib/gitlab/import/set_async_jid.rb index 3b11c92fb56..527d84477fe 100644 --- a/lib/gitlab/import/set_async_jid.rb +++ b/lib/gitlab/import/set_async_jid.rb @@ -2,8 +2,8 @@ # The original import JID is the JID of the RepositoryImportWorker job, # which will be removed once that job completes. Reusing that JID could -# result in StuckImportJobsWorker marking the job as stuck before we get -# to running Stage::ImportRepositoryWorker. +# result in Gitlab::Import::StuckProjectImportJobsWorker marking the job +# as stuck before we get to running Stage::ImportRepositoryWorker. # # We work around this by setting the JID to a custom generated one, then # refreshing it in the various stages whenever necessary. @@ -13,8 +13,7 @@ module Gitlab def self.set_jid(import_state) jid = generate_jid(import_state) - Gitlab::SidekiqStatus - .set(jid, StuckImportJobsWorker::IMPORT_JOBS_EXPIRATION) + Gitlab::SidekiqStatus.set(jid, Gitlab::Import::StuckImportJob::IMPORT_JOBS_EXPIRATION) import_state.update_column(:jid, jid) end |