Created
November 18, 2022 08:53
-
-
Save julianrubisch/02e5074e69d165d1fbf16258c5933f00 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PurgeOrphanedNotificationJob < ApplicationJob | |
queue_as :default | |
def perform | |
Notification.find_each do |n| | |
n.to_notification.message | |
rescue | |
n.destroy | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment