2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-02-05 11:45:47 -05:00
|
|
|
module Jobs
|
2019-10-02 00:01:53 -04:00
|
|
|
class UnsilenceUsers < ::Jobs::Scheduled
|
2018-02-05 11:45:47 -05:00
|
|
|
every 15.minutes
|
|
|
|
|
|
|
|
def execute(args)
|
|
|
|
User.where("silenced_till IS NOT NULL AND silenced_till < now()").find_each do |user|
|
|
|
|
UserSilencer.unsilence(user, Discourse.system_user)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|