def deliver(recipients = nil, enqueue_job: true, **options)
      recipients ||= evaluate_recipients

      validate!

      transaction do
        recipients_attributes = Array.wrap(recipients).map do |recipient|
          recipient_attributes_for(recipient)
        end

        self.notifications_count = recipients_attributes.size
        save!

        if Rails.gem_version >= Gem::Version.new("7.0.0.alpha1")
          notifications.insert_all!(recipients_attributes, record_timestamps: true) if recipients_attributes.any?
        else
          time = Time.current
          recipients_attributes.each do |attributes|
            attributes[:created_at] = time
            attributes[:updated_at] = time
          end
          notifications.insert_all!(recipients_attributes) if recipients_attributes.any?
        end
      end

      # Enqueue delivery job
      EventJob.set(options).perform_later(self) if enqueue_job

      self
    end
CommentNotifier.deliver(User.all)
CommentNotifier.deliver(User.all, priority: 10)
CommentNotifier.deliver(User.all, queue: :low_priority)
CommentNotifier.deliver(User.all, wait: 5.minutes)
CommentNotifier.deliver(User.all, wait_until: 1.hour.from_now)