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)
|
|
|
|
TopicUser.ensure_consistency!
|
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-06-28 03:27:26 +08:00
|
|
|
UserBadge.ensure_consistency!
|
2013-04-05 12:29:46 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|