Skip to content

Commit

Permalink
DBP-830 Fix method name, change cron to hourly
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncolincap committed Aug 27, 2024
1 parent 0d5bb41 commit 99e1f01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def check_user_role_provider
errors.add(:user_provider, 'has to be the same as the Role provider') if provider != role.provider
end

def self.disable_inactive_users
def self.block_inactive_users
setting_id = Setting.find_by(name: 'AutomatedUserBanTime')&.id
days = SiteSetting.find_by(setting_id: setting_id)&.value.to_i
if days.nil? || days.zero?
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

scheduler = Rufus::Scheduler.new

scheduler.cron '0 0 * * *' do
scheduler.cron '0 * * * *' do
User.block_inactive_users
Room.delete_expired_rooms
end

0 comments on commit 99e1f01

Please sign in to comment.