summaryrefslogtreecommitdiff
path: root/app/models/project_import_state.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project_import_state.rb')
-rw-r--r--app/models/project_import_state.rb15
1 files changed, 1 insertions, 14 deletions
diff --git a/app/models/project_import_state.rb b/app/models/project_import_state.rb
index cdb034e58fa..52fd23aefd5 100644
--- a/app/models/project_import_state.rb
+++ b/app/models/project_import_state.rb
@@ -2,6 +2,7 @@
class ProjectImportState < ApplicationRecord
include AfterCommitQueue
+ include ImportState::SidekiqJobTracker
self.table_name = "project_mirror_data"
@@ -88,20 +89,6 @@ class ProjectImportState < ApplicationRecord
# import? does SQL work so only run it if it looks like there's an import running
status == 'started' && project.import?
end
-
- # Refreshes the expiration time of the associated import job ID.
- #
- # This method can be used by asynchronous importers to refresh the status,
- # preventing the StuckImportJobsWorker from marking the import as failed.
- def refresh_jid_expiration
- return unless jid
-
- Gitlab::SidekiqStatus.set(jid, StuckImportJobsWorker::IMPORT_JOBS_EXPIRATION)
- end
-
- def self.jid_by(project_id:, status:)
- select(:jid).with_status(status).find_by(project_id: project_id)
- end
end
ProjectImportState.prepend_if_ee('EE::ProjectImportState')