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: after_status_update_job.rb
    path of file: ./repos/annict/app/jobs
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

class AfterStatusUpdateJob < ApplicationJob
  queue_as :low

  def perform(user_id, work_id, prev_status_kind, new_status_kind)
    user = User.only_kept.find(user_id)
    work = Work.only_kept
    
  def perform(user_id, work_id, prev_status_kind, new_status_kind)
    user = User.only_kept.find(user_id)
    work = Work.only_kept.find(work_id)

    ActiveRecord::Base.transaction do
      user.update_watched_works_count
      user.update_works_count!(prev_status_kind, new_status_kind)
      work.update_watchers_count!(prev_status_kind, new_status_kind)
    end
  end