Sha256: ee517e3be273065d6e42e47c04d453bcb4f3b4f25ec36b76dd5e4c6bf2292a7d

Contents?: true

Size: 438 Bytes

Versions: 4

Compression:

Stored size: 438 Bytes

Contents

module JobDispatch::Sockets
  class Enqueue
    def initialize(bind_address)
      @socket = JobDispatch.context.socket(ZMQ::REQ)
      @socket.bind(bind_address)
    end

    def poll_item
      @poll_item ||= ZMQ::Pollitem(@socket, ZMQ::POLLIN)
    end

    # Enqueue socket when it receives a message simply stores it in the database.
    # It will also send a message to wake a connected dispatcher
    def process

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
job_dispatch-0.2.0 lib/job_dispatch/sockets/enqueue.rb
job_dispatch-0.1.0 lib/job_dispatch/sockets/enqueue.rb
job_dispatch-0.0.2 lib/job_dispatch/sockets/enqueue.rb
job_dispatch-0.0.1 lib/job_dispatch/sockets/enqueue.rb