gitlab-org--gitlab-foss/app/workers/group_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

17 lines
359 B
Ruby

class GroupDestroyWorker
include Sidekiq::Worker
include DedicatedSidekiqQueue
include ExceptionBacktrace
def perform(group_id, user_id)
begin
group = Group.with_deleted.find(group_id)
rescue ActiveRecord::RecordNotFound
return
end
user = User.find(user_id)
Groups::DestroyService.new(group, user).execute
end
end