Add latest changes from gitlab-org/gitlab@master

This commit is contained in:
GitLab Bot 2020-02-09 21:09:08 +00:00
parent e16c0f461f
commit d2e7b5d069
1 changed files with 6 additions and 4 deletions

View File

@ -3,7 +3,7 @@
module PersonalAccessTokens
class ExpiringWorker
include ApplicationWorker
include CronjobQueue # rubocop:disable Scalability/CronWorkerContext
include CronjobQueue
feature_category :authentication_and_authorization
@ -12,6 +12,7 @@ module PersonalAccessTokens
limit_date = PersonalAccessToken::DAYS_TO_EXPIRE.days.from_now.to_date
User.with_expiring_and_not_notified_personal_access_tokens(limit_date).find_each do |user|
with_context(user: user) do
notification_service.access_token_about_to_expire(user)
Rails.logger.info "#{self.class}: Notifying User #{user.id} about expiring tokens" # rubocop:disable Gitlab/RailsLogger
@ -21,3 +22,4 @@ module PersonalAccessTokens
end
end
end
end