inginious.backend package

Submodules

inginious.backend.backend module

class inginious.backend.backend.AgentInfo(name, environments, ssh_allowed)

Bases: tuple

environments

Alias for field number 1

name

Alias for field number 0

ssh_allowed

Alias for field number 2

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.

async handle_agent_hello(agent_addr, message)[source]

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

async handle_agent_job_done(agent_addr, message)[source]

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

async handle_agent_job_ssh_debug(agent_addr, message)[source]

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

async handle_agent_job_started(agent_addr, message)[source]

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

async handle_agent_message(agent_addr, message)[source]

Dispatch messages received from agents to the right handlers

async handle_client_get_queue(client_addr, _)[source]

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

async handle_client_hello(client_addr, _)[source]

Handle an ClientHello message. Send available environments to the client

async handle_client_kill_job(client_addr, message)[source]

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

async handle_client_message(client_addr, message)[source]

Dispatch messages received from clients to the right handlers

async handle_client_new_job(client_addr, message)[source]

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

async handle_client_ping(client_addr, _)[source]

Handle an Ping message. Pong the client

async run()[source]
async send_environment_update_to_client(client_addrs)[source]
Parameters

client_addrs – list of clients to which we should send the update

async update_queue()[source]

Send waiting jobs to available agents

class inginious.backend.backend.EnvironmentInfo(last_id, created_last, agents, type)

Bases: tuple

agents

Alias for field number 2

created_last

Alias for field number 1

last_id

Alias for field number 0

type

Alias for field number 3

class inginious.backend.backend.RunningJob(agent_addr, client_addr, msg, time_started)

Bases: tuple

agent_addr

Alias for field number 0

client_addr

Alias for field number 1

msg

Alias for field number 2

time_started

Alias for field number 3

class inginious.backend.backend.WaitingJob(priority, time_received, client_addr, job_id, msg)

Bases: tuple

client_addr

Alias for field number 2

job_id

Alias for field number 3

msg

Alias for field number 4

priority

Alias for field number 0

time_received

Alias for field number 1