gitlab-org--gitlab-foss/app/workers/project_destroy_worker.rb
Stan Hu 32b688e785 Enable 5 lines of Sidekiq backtrace lines to aid in debugging
Customers often have Sidekiq jobs that failed without much context. Without
Sentry, there's no way to tell where these exceptions were hit. Adding
in additional lines adds a bit more Redis storage overhead. This commit
adds in backtrace logging for workers that delete groups/projects and
import/export projects.

Closes #27626
2017-08-25 05:27:42 -07:00

14 lines
445 B
Ruby

class ProjectDestroyWorker
include Sidekiq::Worker
include DedicatedSidekiqQueue
include ExceptionBacktrace
def perform(project_id, user_id, params)
project = Project.find(project_id)
user = User.find(user_id)
::Projects::DestroyService.new(project, user, params.symbolize_keys).execute
rescue ActiveRecord::RecordNotFound => error
logger.error("Failed to delete project (#{project_id}): #{error.message}")
end
end