Sha256: deeab8a2dab4dc036bff7dc72751f0aed74fb5a6856d3119e4867e474bc288fe
Contents?: true
Size: 718 Bytes
Versions: 30
Compression:
Stored size: 718 Bytes
Contents
# frozen_string_literal: true module Cron # # Trim notifications in system after 30 days. # # This was historically done by a database index, however with the introduction # of adding an email attachment, and thus another collection, this needed to move # to a daily job here so that: # 1. the object hierarchy is deleted # 2. The paperclip call backs are fired to remove the file from S3 # # In case you are wondering why not make it an embedded class and allow the index # method to still work, the answer is that it won't clean up the S3 files. # class TrimNotifications < TrimCollection # # Return the collection # def collection Notification.all end end end
Version data entries
30 entries across 30 versions & 1 rubygems