Commit Graph

3 Commits

Author SHA1 Message Date
Cody Cutrer 06763dd519 add # frozen_string_literal: true for lib
Change-Id: I59b751cac52367a89e03f572477f0cf1d607b405
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/251155
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2020-10-27 20:49:50 +00:00
Landon Wilkins 388e6f474f da licença part 28
add consistent license headers to all source files
(ruby, coffeescript, javascript)

except for vendor files

Change-Id: I394b225a1a6d43da86d0986b0ef303544bc9ddfc
Reviewed-on: https://gerrit.instructure.com/110052
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2017-04-27 21:53:35 +00:00
Zach Pendleton 30832ea301 remove messages older than 360 days
fixes CNVS-9304

this commit also replaces the current MessageScrubber
class and moves its old function to the aptly named
DelayedMessageScrubber.

test plan:
  * in a rails console, run the following in a rails
    console:

  Setting.set('message_scrubber_limit', 7)
  scrubber = MessageScrubber.new
  scrubber.scrub_all

  * verify that all messages older than 7 days
    have been deleted and that messages newser than
    7 days (assuming you have any) still exist. you
    can do this by running the following in a rails
    console:

  # this should be 0
  Message.where('sent_at < ?', scrubber.limit).count

  # this should be > 0
  Message.where('sent_at > ?', scrubber.limit).count

Change-Id: I6c054971b3bcc8ec5a436edf4454ff0f0952f41b
Reviewed-on: https://gerrit.instructure.com/26017
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Zach Pendleton <zachp@instructure.com>
2013-11-07 17:19:59 +00:00