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!
|
2016-04-04 23:03:18 +08:00
|
|
|
Group.ensure_consistency!
|
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!
|
2016-05-03 05:15:32 +08:00
|
|
|
UserStat.ensure_consistency!(13.hours.ago)
|
2015-07-29 22:34:21 +08:00
|
|
|
Topic.ensure_consistency!
|
2015-08-14 19:03:49 +08:00
|
|
|
Badge.ensure_consistency!
|
2015-09-03 04:02:31 +08:00
|
|
|
CategoryUser.ensure_consistency!
|
2016-03-17 07:03:56 +08:00
|
|
|
UserOption.ensure_consistency!
|
2018-01-12 00:59:51 +08:00
|
|
|
Tag.ensure_consistency!
|
2018-02-09 05:36:39 +08:00
|
|
|
CategoryTagStat.ensure_consistency!
|
2018-08-31 12:46:22 +08:00
|
|
|
User.ensure_consistency!
|
|
|
|
UserAvatar.ensure_consistency!
|
2013-04-05 12:29:46 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|