Grid Queueing

Interface for configuring and submitting jobs on a computing cluster. Do not use this class directly. Instead use one of the implementations that inherit from this class.

iceprod.server.grid.get_host()[source]

Cache the host fqdn for 1 hour

class iceprod.server.grid.BaseGrid(gridspec, queue_cfg, cfg, modules, executor, statsd, rest_client, cred_client)[source]

Interface for a generic job distribution system. Do not use this class directly. Use one of the plugins.

GRID_STATES = ('queued', 'processing', 'completed', 'error', 'unknown')
async check_and_clean()[source]

Check and clean the grid

async queue()[source]

Queue tasks to the grid

get_queue_num(available=100000)[source]

Determine how many pilots to queue.

async setup_pilots(tasks)[source]

Setup pilots for the task reqs

get_token()[source]
async get_user_credentials(username)[source]
async get_group_credentials(group)[source]
async customize_task_config(task_cfg, job_cfg=None, dataset=None)[source]

Transforms for the task config

async setup_submit_directory(task)[source]

Set up submit directory

create_config(task)[source]
write_cfg(task)[source]

Write the config file for a task-like object

get_submit_args(task, cfg=None, passkey=None)[source]

Get the submit arguments to start the loader script.

async get_grid_status()[source]

Get all tasks running on the queue system. Returns {grid_queue_id:{status,submit_dir}}

async generate_submit_file(task, cfg=None, passkey=None, filelist=None)[source]

Generate queueing system submit file for task in dir.

async submit(task)[source]

Submit task to queueing system.

async remove(tasks)[source]

Remove tasks from queueing system.