2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2013-04-05 00:29:46 -04:00
|
|
|
module Jobs
|
2013-05-08 01:20:38 -04:00
|
|
|
# various consistency checks
|
2013-08-07 13:25:05 -04:00
|
|
|
class EnsureDbConsistency < Jobs::Scheduled
|
2014-02-11 00:11:40 -05:00
|
|
|
every 12.hours
|
2013-08-07 13:25:05 -04:00
|
|
|
|
2013-04-05 00:29:46 -04:00
|
|
|
def execute(args)
|
2013-04-05 02:43:48 -04:00
|
|
|
UserVisit.ensure_consistency!
|
2016-04-04 11:03:18 -04:00
|
|
|
Group.ensure_consistency!
|
2013-05-16 03:50:14 -04:00
|
|
|
Notification.ensure_consistency!
|
2013-07-17 02:40:15 -04:00
|
|
|
UserAction.ensure_consistency!
|
2014-08-18 03:13:10 -04:00
|
|
|
TopicFeaturedUsers.ensure_consistency!
|
2014-10-15 15:09:08 -04:00
|
|
|
PostRevision.ensure_consistency!
|
2016-05-02 17:15:32 -04:00
|
|
|
UserStat.ensure_consistency!(13.hours.ago)
|
2015-07-29 10:34:21 -04:00
|
|
|
Topic.ensure_consistency!
|
2015-08-14 07:03:49 -04:00
|
|
|
Badge.ensure_consistency!
|
2015-09-02 16:02:31 -04:00
|
|
|
CategoryUser.ensure_consistency!
|
2016-03-16 19:03:56 -04:00
|
|
|
UserOption.ensure_consistency!
|
2018-01-11 11:59:51 -05:00
|
|
|
Tag.ensure_consistency!
|
2018-02-08 16:36:39 -05:00
|
|
|
CategoryTagStat.ensure_consistency!
|
2018-08-31 00:46:22 -04:00
|
|
|
User.ensure_consistency!
|
|
|
|
UserAvatar.ensure_consistency!
|
2013-04-05 00:29:46 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|