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

# == Schema Information
#
# Table name: webhooks
#
#  id             :integer          not null, primary key
#  namespace_id   :integer
#  url            :string(255)
#  username       :string(255)
#  password       :string(255)
#  request_method :integer
#  content_type   :integer
#  enabled        :boolean          default(FALSE)
#  created_at     :datetime         not null
#  updated_at     :datetime         not null
#  name           :string(255)      not null
#
# Indexes
#
#  index_webhoo
    
  def self.handle_push_event(event)
    registry = Registry.find_from_event(event)
    return if registry.nil?

    namespace, = Namespace.get_from_repository_name(event["target"]["repository"], registry)
    return if namespace.nil?

    hydra = Typhoeus::Hydra.hydra

    namespace.webhooks.each do |webhook|
      next unless webhook.enabled

      headers = webhook.process_headers

      args = {
        method:  webhook.request_method,
        headers: headers,
        body:    JSON.generate(event),
        timeout: 60,
        userpwd: webhook.process_auth
      }

      hydra.queue create_request(webhook, args, headers, event)
    end

    hydra.run
  end