2018-06-27 07:23:28 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-08-18 21:45:41 +00:00
|
|
|
class RemoveExpiredGroupLinksWorker
|
2017-11-28 16:08:30 +00:00
|
|
|
include ApplicationWorker
|
2016-10-21 16:13:41 +00:00
|
|
|
include CronjobQueue
|
2016-08-18 21:45:41 +00:00
|
|
|
|
2019-10-18 11:11:44 +00:00
|
|
|
feature_category :authentication_and_authorization
|
|
|
|
|
2016-08-18 21:45:41 +00:00
|
|
|
def perform
|
2018-08-16 12:46:40 +00:00
|
|
|
ProjectGroupLink.expired.destroy_all # rubocop: disable DestroyAll
|
2019-11-05 09:21:54 +00:00
|
|
|
|
|
|
|
GroupGroupLink.expired.find_in_batches do |link_batch|
|
|
|
|
Groups::GroupLinks::DestroyService.new(nil, nil).execute(link_batch)
|
|
|
|
end
|
2016-08-18 21:45:41 +00:00
|
|
|
end
|
|
|
|
end
|