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