Improved cleanup again, reduced time to remove of old messages.
This commit is contained in:
parent
a4323a7f99
commit
18a21170a2
1 changed files with 2 additions and 2 deletions
|
@ -126,11 +126,11 @@ cleanup old stream messages
|
|||
|
||||
optional you can parse the max oldest stream entries
|
||||
|
||||
ActivityStream.cleanup(4.months)
|
||||
ActivityStream.cleanup(3.months)
|
||||
|
||||
=end
|
||||
|
||||
def self.cleanup(diff = 4.months)
|
||||
def self.cleanup(diff = 3.months)
|
||||
ActivityStream.where('created_at < ?', Time.zone.now - diff).delete_all
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue