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-06 07:14:41 +08:00
|
|
|
every 1.day
|
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!
|
2013-04-05 12:29:46 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|