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

module AfterCommitQueue
  extend ActiveSupport::Concern

  included do
    after_commit :_run_after_commit_queue
    after_rollback :_clear_after_commit_queue
  end

  def run_after_commit(&block)
    _after_commit_queue << block i
    
  def run_after_commit_or_now(&block)
    if self.class.inside_transaction?
      if connection.current_transaction.records&.include?(self)
        run_after_commit(&block)
      else
        # If the current transaction does not include this record, we can run
        # the block now, even if it queues a Sidekiq job.
        Sidekiq::Worker.skipping_transaction_check do
          instance_eval(&block)
        end
      end
    else
      instance_eval(&block)
    end