Sha256: 40b7640d598fa1c6fe300ca5e3bdebcace99aa773dc46f54c21435d5f3aafd04

Contents?: true

Size: 563 Bytes

Versions: 1

Compression:

Stored size: 563 Bytes

Contents

begin
  require 'beanstalk-client'
rescue LoadError
  STDERR.puts "You need the 'beanstalk-client' gem if you want to use Beanstalkd transport."
end

module Hoth
  module Transport

    class Beanstalkd < Base

      def call_remote_with(*args)
        connection = Beanstalk::Pool.new(["#{endpoint.host}:#{endpoint.port}"])
        connection.use("#{endpoint.module_name}/#{name}")

        encoded_args = encoder.encode(args)
        Rails.logger.debug "encoded_args: #{encoded_args}"
        connection.put encoded_args
      end
      
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hoth-0.3.2.beta1 lib/hoth/transport/beanstalkd.rb