inginious.backend package

Submodules

inginious.backend.backend module

class inginious.backend.backend.Backend(context, agent_addr, client_addr)[source]

Bases: object

Backend. Central point of the architecture, manages communication between clients (frontends) and agents. Schedule jobs on agents.

handle_agent_hello(agent_addr, message: inginious.common.messages.AgentHello)[source]

Handle an AgentAvailable message. Add agent_addr to the list of available agents

handle_agent_job_done(agent_addr, message: inginious.common.messages.AgentJobDone)[source]

Handle an AgentJobDone message. Send the data back to the client, and start new job if needed

handle_agent_job_ssh_debug(_, message: inginious.common.messages.AgentJobSSHDebug)[source]

Handle an AgentJobSSHDebug message. Send the data back to the client

handle_agent_job_started(agent_addr, message: inginious.common.messages.AgentJobStarted)[source]

Handle an AgentJobStarted message. Send the data back to the client

handle_agent_message(agent_addr, message)[source]

Dispatch messages received from agents to the right handlers

handle_client_get_queue(client_addr, _: inginious.common.messages.ClientGetQueue)[source]

Handles a ClientGetQueue message. Send back info about the job queue

handle_client_hello(client_addr, _: inginious.common.messages.ClientHello)[source]

Handle an ClientHello message. Send available containers to the client

handle_client_kill_job(client_addr, message: inginious.common.messages.ClientKillJob)[source]

Handle an ClientKillJob message. Remove a job from the waiting list or send the kill message to the right agent.

handle_client_message(client_addr, message)[source]

Dispatch messages received from clients to the right handlers

handle_client_new_job(client_addr, message: inginious.common.messages.ClientNewJob)[source]

Handle an ClientNewJob message. Add a job to the queue and triggers an update

handle_client_ping(client_addr, _: inginious.common.messages.Ping)[source]

Handle an Ping message. Pong the client

run()[source]
send_container_update_to_client(client_addrs)[source]
Parameters:client_addrs – list of clients to which we should send the update
update_queue()[source]

Send waiting jobs to available agents