Class: TestUserDashboard::DailyMaintenance

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
app/sidekiq/test_user_dashboard/daily_maintenance.rb

Constant Summary collapse

TUD_ACCOUNTS_TABLE =
'tud_accounts'

Instance Method Summary collapse

Instance Method Details

#checkin_tud_accountsObject (private)



15
16
17
18
19
20
21
22
23
# File 'app/sidekiq/test_user_dashboard/daily_maintenance.rb', line 15

def checkin_tud_accounts
  TestUserDashboard::TudAccount.where.not(checkout_time: nil).find_each do ||
    .update(checkout_time: nil)

    TestUserDashboard::AccountMetrics
      .new()
      .checkin(is_manual_checkin: true)
  end
end

#performObject



9
10
11
# File 'app/sidekiq/test_user_dashboard/daily_maintenance.rb', line 9

def perform
  checkin_tud_accounts
end