2013-04-05 15:29:46 +11:00
|
|
|
module Jobs
|
2013-05-08 15:20:38 +10:00
|
|
|
# various consistency checks
|
2013-08-07 19:25:05 +02:00
|
|
|
class EnsureDbConsistency < Jobs::Scheduled
|
2014-02-11 16:11:40 +11:00
|
|
|
every 12.hours
|
2013-08-07 19:25:05 +02:00
|
|
|
|
2013-04-05 15:29:46 +11:00
|
|
|
def execute(args)
|
2013-04-05 17:43:48 +11:00
|
|
|
UserVisit.ensure_consistency!
|
2013-05-08 15:20:38 +10:00
|
|
|
Group.refresh_automatic_groups!
|
2013-05-16 17:50:14 +10:00
|
|
|
Notification.ensure_consistency!
|
2013-07-17 16:40:15 +10:00
|
|
|
UserAction.ensure_consistency!
|
2014-08-18 17:13:10 +10:00
|
|
|
TopicFeaturedUsers.ensure_consistency!
|
2014-10-15 21:09:08 +02:00
|
|
|
PostRevision.ensure_consistency!
|
2014-08-07 14:20:42 +10:00
|
|
|
UserStat.update_view_counts(13.hours.ago)
|
2013-04-05 15:29:46 +11:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|