Async::JobSourceAsyncJobQueue

class Queue

Represents a job queue that manages the client and server components of a job processing system. The queue acts as a facade that provides a unified interface for both enqueueing jobs and managing the processing server lifecycle.

Definitions

def initialize(client, server, delegate)

Initialize a new job queue.

Signature

parameter client Object

The client component for enqueueing jobs.

parameter server Object

The server component for processing jobs.

parameter delegate Object

The delegate that will execute the jobs.

Implementation

def initialize(client, server, delegate)
	@client = client
	@server = server
	@delegate = delegate
end

attr :client

Signature

attribute Object

The client component for enqueueing jobs.

attr :server

Signature

attribute Object

The server component for processing jobs.

attr :delegate

Signature

attribute Object

The delegate that will execute the jobs.

def call(...)

Enqueue a job using the client component.

Implementation

def call(...)
	@client.call(...)
end

def start

Start the job processing server.

Implementation

def start
	@server.start
end

def stop

Stop the job processing server.

Implementation

def stop
	@server.stop
end