Skip to content

Commit ace2366

Browse files
committed
refactor(invitations): use destroy_by for expired log cleanup
1 parent 189a0ba commit ace2366

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/jobs/cleanup_expired_invitation_logs_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ class CleanupExpiredInvitationLogsJob < ApplicationJob
22
queue_as :default
33

44
def perform
5-
InvitationLog.where('expires_at < ?', Time.current).destroy_all
5+
InvitationLog.destroy_by(expires_at: ..Time.current)
66
end
77
end

0 commit comments

Comments
 (0)