JSONRPC Calls¶
Functions to communicate with the server using JSONRPC
- class iceprod.core.exe_json.ServerComms(url, passkey, config, **kwargs)[source]¶
Setup JSONRPC communications with the IceProd server.
- Parameters:
- async download_task(gridspec, resources={}, site='', query_params=None)[source]¶
Download new task(s) from the server.
- async task_files(dataset_id, task_id)[source]¶
Get the task files for a dataset and task.
- Parameters:
- Returns:
list of
iceprod.core.dataclasses.Data
objects- Return type:
- async processing(task_id)[source]¶
Tell the server that we are processing this task.
Only used for single task config, not for pilots.
- Parameters:
task_id (str) – task_id to mark as processing
- async finish_task(task_id, dataset_id=None, stats={}, stat_filter=None, start_time=None, resources=None, site=None)[source]¶
Finish a task.
- Parameters:
task_id (str) – task_id of task
dataset_id (str) – (optional) dataset_id of task
stats (dict) – (optional) task statistics
stat_filter (iterable) – (optional) stat filter by keywords
start_time (float) – (optional) task start time in unix seconds
resources (dict) – (optional) task resource usage
site (str) – (optional) site the task is running at
- async still_running(task_id)[source]¶
Check if the task should still be running according to the DB.
- Parameters:
task_id (str) – task_id of task
- async task_error(task_id, dataset_id=None, stats={}, start_time=None, reason=None, resources=None, site=None, failed=False)[source]¶
Tell the server about the error experienced
- Parameters:
task_id (str) – task_id of task
dataset_id (str) – (optional) dataset_id of task
stats (dict) – (optional) task statistics
start_time (float) – (optional) task start time in unix seconds
reason (str) – (optional) one-line summary of error
resources (dict) – (optional) task resource usage
site (str) – (optional) site the task is running at
failed (bool) – (optional) instead of resetting the task, just fail
- async task_kill(task_id, dataset_id=None, resources=None, reason=None, message=None, site=None)[source]¶
Tell the server that we killed a task.
- Parameters:
- async create_pilot(**kwargs)[source]¶
Create an entry in the pilot table.
- Parameters:
**kwargs – passed through to rest function
- Returns:
pilot id
- Return type:
- async update_pilot(pilot_id, **kwargs)[source]¶
Update the pilot table.
- Parameters:
pilot_id (str) – pilot id
**kwargs – passed through to rest function
- async delete_pilot(pilot_id, **kwargs)[source]¶
Delete the pilot.
- Parameters:
pilot_id (str) – pilot id
- task_kill_sync(task_id, dataset_id=None, resources=None, reason=None, message=None, site=None)[source]¶
Tell the server that we killed a task (synchronous version).
- Parameters: