Class: ScheduleWorkers::ExpiredAdaptivePointsRatio
- Inherits:
-
ApplicationWorker
- Object
- ApplicationWorker
- ScheduleWorkers::ExpiredAdaptivePointsRatio
- Defined in:
- app/workers/schedule_workers/expired_adaptive_points_ratio.rb
Instance Method Summary collapse
Methods inherited from ApplicationWorker
Instance Method Details
#perform ⇒ Object
7 8 9 10 11 12 |
# File 'app/workers/schedule_workers/expired_adaptive_points_ratio.rb', line 7 def perform current_date = Time.thai_time.to_date expired_adaptive_points_ratios = ::AdaptivePointsRatio.where('is_active IS TRUE AND end_date < ?', current_date) expired_adaptive_points_ratios.update_all(is_active: false) end |