delete error reports based on creation date

We already have an index on creation date. These are mostly immutable, so I'm
not sure why we would want to purge based on updated date.

Change-Id: Ie52cee3d364dffbf644a73efa9322bf00e3bb362
Reviewed-on: https://gerrit.instructure.com/3942
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
This commit is contained in:
Zach Wily 2011-05-31 14:32:45 -06:00
parent 907384a598
commit 1d6cadf7a6
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ class ErrorReport < ActiveRecord::Base
# delete old error reports before a given date # delete old error reports before a given date
# returns the number of destroyed error reports # returns the number of destroyed error reports
def self.destroy_error_reports(before_date) def self.destroy_error_reports(before_date)
self.delete_all(['updated_at < ?', before_date]) self.delete_all(['created_at < ?', before_date])
end end
def self.useful_http_env_stuff_from_request(request) def self.useful_http_env_stuff_from_request(request)