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

Version Path
web47core-0.6.3 lib/app/jobs/cron/trim_notifications.rb
web47core-0.6.2 lib/app/jobs/cron/trim_notifications.rb
web47core-0.6.1 lib/app/jobs/cron/trim_notifications.rb
web47core-0.6.0 lib/app/jobs/cron/trim_notifications.rb
web47core-0.5.5 lib/app/jobs/cron/trim_notifications.rb
web47core-0.5.4 lib/app/jobs/cron/trim_notifications.rb
web47core-0.5.3 lib/app/jobs/cron/trim_notifications.rb
web47core-0.5.2 lib/app/jobs/cron/trim_notifications.rb
web47core-0.4.5 lib/app/jobs/cron/trim_notifications.rb
web47core-0.4.4 lib/app/jobs/cron/trim_notifications.rb
web47core-0.4.3 lib/app/jobs/cron/trim_notifications.rb
web47core-0.4.2 lib/app/jobs/cron/trim_notifications.rb
web47core-0.4.0 lib/app/jobs/cron/trim_notifications.rb
web47core-0.3.4 lib/app/jobs/cron/trim_notifications.rb
web47core-0.3.3 lib/app/jobs/cron/trim_notifications.rb
web47core-0.3.2 lib/app/jobs/cron/trim_notifications.rb
web47core-0.3.1 lib/app/jobs/cron/trim_notifications.rb
web47core-0.3.0 lib/app/jobs/cron/trim_notifications.rb
web47core-0.1.11 lib/app/jobs/cron/trim_notifications.rb
web47core-0.1.10 lib/app/jobs/cron/trim_notifications.rb