32b688e785
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
14 lines
445 B
Ruby
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
|