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

require 'json'
require 'socket'
require 'resolv'

module Integrations
  class IrkerWorker # rubocop:disable Scalability/IdempotentWorker
    include ApplicationWorker

    data_consistency :always
    sidekiq_options retry: 3
    feature_category :integrations
    urgency :low

    def perform(project_id, channels, colors, push_data, settings)
      # Establish connection to irker server
      return false unless start_connection(
        settings['server_host'],
        settings['server_port']
      )

      @project = Project.find(project_id)
      @colors = colors
      @channels = channels

      @repo_path = @project.full_path
      @repo_name = push_data['reposito
    
    def start_connection(irker_server, irker_port)
      ip_address = Resolv.getaddress(irker_server)
      # handle IP6 addresses
      domain = Resolv::IPv6::Regex.match?(ip_address) ? "[#{ip_address}]" : ip_address

      begin
        Gitlab::HTTP_V2::UrlBlocker.validate!(
          "irc://#{domain}",
          allow_localhost: allow_local_requests?,
          allow_local_network: allow_local_requests?,
          schemes: ['irc'],
          deny_all_requests_except_allowed: Gitlab::CurrentSettings.deny_all_requests_except_allowed?,
          outbound_local_requests_allowlist: Gitlab::CurrentSettings.outbound_local_requests_whitelist) # rubocop:disable Naming/InclusiveLanguage -- existing setting
        @socket = TCPSocket.new ip_address, irker_port
      rescue Errno::ECONNREFUSED, Gitlab::HTTP_V2::UrlBlocker::BlockedUrlError => e
        logger.fatal "Can't connect to Irker daemon: #{e}"
        return false
      end