mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-09 04:36:11 +10:00
Merge branch 'fix/project-export-error' into 'master'
Add more debug info to import/export and memory killer This should help debug https://gitlab.com/gitlab-org/gitlab-ce/issues/19124 further See merge request !5108
This commit is contained in:
@@ -38,6 +38,8 @@ module Projects
|
||||
end
|
||||
|
||||
def cleanup_and_notify
|
||||
Rails.logger.error("Import/Export - Project #{project.name} with ID: #{project.id} export error - #{@shared.errors.join(', ')}")
|
||||
|
||||
FileUtils.rm_rf(@shared.export_path)
|
||||
|
||||
notify_error
|
||||
@@ -45,6 +47,8 @@ module Projects
|
||||
end
|
||||
|
||||
def notify_success
|
||||
Rails.logger.info("Import/Export - Project #{project.name} with ID: #{project.id} successfully exported")
|
||||
|
||||
notification_service.project_exported(@project, @current_user)
|
||||
end
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ module Gitlab
|
||||
end
|
||||
|
||||
def execute(cmd)
|
||||
_output, status = Gitlab::Popen.popen(cmd)
|
||||
output, status = Gitlab::Popen.popen(cmd)
|
||||
@shared.error(output.to_s) unless status.zero?
|
||||
status.zero?
|
||||
end
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ module Gitlab
|
||||
Rails.logger.info("Saved project export #{archive_file}")
|
||||
archive_file
|
||||
else
|
||||
@shared.error("Unable to save #{archive_file} into #{@shared.export_path}")
|
||||
false
|
||||
end
|
||||
rescue => e
|
||||
|
||||
@@ -29,11 +29,11 @@ module Gitlab
|
||||
"in #{GRACE_TIME} seconds"
|
||||
sleep(GRACE_TIME)
|
||||
|
||||
Sidekiq.logger.warn "sending SIGTERM to PID #{Process.pid}"
|
||||
Sidekiq.logger.warn "sending SIGTERM to PID #{Process.pid} - Worker #{worker.class} - JID-#{job['jid']}"
|
||||
Process.kill('SIGTERM', Process.pid)
|
||||
|
||||
Sidekiq.logger.warn "waiting #{SHUTDOWN_WAIT} seconds before sending "\
|
||||
"#{SHUTDOWN_SIGNAL} to PID #{Process.pid}"
|
||||
"#{SHUTDOWN_SIGNAL} to PID #{Process.pid} - Worker #{worker.class} - JID-#{job['jid']}"
|
||||
sleep(SHUTDOWN_WAIT)
|
||||
|
||||
Sidekiq.logger.warn "sending #{SHUTDOWN_SIGNAL} to PID #{Process.pid} - Worker #{worker.class} - JID-#{job['jid']}"
|
||||
|
||||
Reference in New Issue
Block a user