Skip to content
Snippets Groups Projects
Commit 66e6052b authored by Robert Speicher's avatar Robert Speicher
Browse files

Merge branch 'check-import-job-status' into 'master'

Check and report import job status to help diagnose issues with forking

There are no functional changes, but adding checks/logs for Sidekiq job IDs to help track down why many users seem to get stuck fork/import jobs.

See merge request !3672
parents 2c9894d4 c162e027
No related branches found
No related tags found
1 merge request!3672Check and report import job status to help diagnose issues with forking
Pipeline #
Loading
@@ -389,9 +389,15 @@ class Project < ActiveRecord::Base
Loading
@@ -389,9 +389,15 @@ class Project < ActiveRecord::Base
   
def add_import_job def add_import_job
if forked? if forked?
RepositoryForkWorker.perform_async(self.id, forked_from_project.path_with_namespace, self.namespace.path) job_id = RepositoryForkWorker.perform_async(self.id, forked_from_project.path_with_namespace, self.namespace.path)
else else
RepositoryImportWorker.perform_async(self.id) job_id = RepositoryImportWorker.perform_async(self.id)
end
if job_id
Rails.logger.info "Import job started for #{path_with_namespace} with job ID #{job_id}"
else
Rails.logger.error "Import job failed to start for #{path_with_namespace}"
end end
end end
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment