You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: email_worker.rb
    path of file: ./repos/catarse/app/workers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class EmailWorker
  include Sidekiq::Worker
  sid
    
  def perform(notification_id)
    resource = Notification.find notification_id

    # We don't want to raise exceptions in case our notification does not exist in the database
    if resource
      resource.update_attribute :sent_at, DateTime.now
      resource.deliver_without_worker
    else
      raise "Notification #{notification_id} not found.. sending to retry queue"
    end
  end