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: update_worker.rb
    path of file: ./repos/forem/app/workers/notifications
    
    the code of the file until where you have to start completion: module Notifications
  class UpdateWorker
    include Sidekiq::Job

    sidekiq_options queue: :medium_priority, retry: 10, lock: :until_executing

    def perform(notifiable_id, notifiable_class, action = nil)
      raise InvalidNotifiableForUpdate,
    
    def perform(notifiable_id, notifiable_class, action = nil)
      raise InvalidNotifiableForUpdate, notifiable_class unless %w[Article Comment].include?(notifiable_class)

      notifiable = notifiable_class.constantize.find_by(id: notifiable_id)

      return unless notifiable

      Notifications::Update.call(notifiable, action)
    end