fixes for tag subs

This commit is contained in:
albert
2013-04-03 14:36:28 -04:00
parent 786655ae39
commit 3a96bb0811
4 changed files with 3 additions and 6 deletions

View File

@@ -82,6 +82,6 @@ class Cache
end
def self.sanitize(key)
key.gsub(/\W/) {|x| "%#{x.ord}"}.slice(0, 240)
key.gsub(/\W/) {|x| "%#{x.ord}"}.slice(0, 230)
end
end

View File

@@ -5,6 +5,7 @@ class DailyMaintenance
Upload.delete_all(['created_at < ?', 1.day.ago])
ModAction.delete_all(['created_at < ?', 3.days.ago])
Delayed::Job.delete_all(['created_at < ?'], 1.day.ago)
TagSubscription.process_all
prune_ad_hits
end

View File

@@ -51,7 +51,7 @@ class TagSubscription < ActiveRecord::Base
end
def is_active?
creator.last_logged_in_at && creator.last_logged_in_at > 1.year.ago
creator.last_logged_in_at && creator.last_logged_in_at > 3.months.ago
end
def editable_by?(user)

View File

@@ -1,9 +1,5 @@
set :output, "/var/log/whenever.log"
every 4.hours do
runner "TagSubscription.process_all"
end
every 1.hour do
runner "UploadErrorChecker.new.check!"
end