class DonationCreatedJob < Struct.new(:donation_id)
  def perform
    donation = Donation.find(donation_id)

    raise 'Unknown donation id' if donation.nil?

    Event.create_donation_event!(donation.user)
  end

  def max_attempts
    3
  end

end