-
Notifications
You must be signed in to change notification settings - Fork 94
Documenting Communications Layer
Andrew Clark edited this page Jan 15, 2015
·
7 revisions
Two interfaces provided via Pyro for communicating with suite:
- A "command_queue" -
from cylc.suite_cmd_interface import comqueue
- A "info_interface" -
from cylc.suite_info_interface import info_interface
Also using Pyro is a log interface via:
- "log_interface" -
from cylc.suite_log_interface import log_interface
The commands these work with are defined in scheduler.py
under def configure
which links the incoming messages with various commands, outlined below.
All of these require access to the suite passphrase. A number of them could potentially be made available as accessible by anyone e.g. "get cylc version".
Command: | ping suite |
---|---|
Calls: | info_ping_suite( self ) |
Returns: | True |
Notes: |
Command: | ping task |
---|---|
Calls: | info_ping_task( self, task_id ) |
Returns: | self.pool.ping_task( task_id ) |
Notes: |
Command: | suite info |
---|---|
Calls: | info_get_suite_info( self ) |
Returns: | [ self.config.cfg['title'], user ] |
Notes: |
Command: | task info |
---|---|
Calls: | info_get_task_info( self, task_names ) |
Returns: | info |
Notes: |
info is a dict with keys for each of the task names requested |
Command: | all families |
---|---|
Calls: | info_get_all_families( self, exclude_root=False ) |
Returns: | List of families including or excluding the "root" family |
Notes: |
Command: | triggering families |
---|---|
Calls: | info_get_triggering_families( self ) |
Returns: | self.config.triggering_families |
Notes: |
Command: | first-parent ancestors |
---|---|
Calls: | info_get_first_parent_ancestors( self, pruned=False ) |
Returns: | deepcopy(self.config.get_first_parent_ancestors(pruned) ) |
Notes: | single-inheritance hierarchy based on first parents |
Command: | first-parent descendants |
---|---|
Calls: | info_get_first_parent_descendants( self ) |
Returns: | deepcopy(self.config.get_first_parent_descendants()) |
Notes: |
Command: | graph raw |
---|---|
Calls: | info_get_graph_raw( self, cto, ctn, group_nodes, ungroup_nodes,ungroup_recursive, group_all, ungroup_all ) |
Returns: | self.config.get_graph_raw( cto, ctn, group_nodes, ungroup_nodes, ungroup_recursive, group_all, ungroup_all), self.config.suite_polling_tasks, self.config.leaves, self.config.feet |
Notes: |
Command: | task requisites |
---|---|
Calls: | info_get_task_requisites( self, in_ids ) |
Returns: | self.pool.get_task_requisites( ids ) |
Notes: |
Command: | get cylc version |
---|---|
Calls: | info_get_cylc_version(self) |
Returns: | CYLC_VERSION |
Notes: |
Command: | |
---|---|
Calls: | |
Returns: | |
Notes: |
# control commands to expose indirectly via a command queue
self.control_commands = {
'stop cleanly' : self.command_set_stop_cleanly,
'stop now' : self.command_stop_now,
'stop after point' : self.command_set_stop_after_point,
'stop after clock time' : self.command_set_stop_after_clock_time,
'stop after task' : self.command_set_stop_after_task,
'release suite' : self.command_release_suite,
'release task' : self.command_release_task,
'remove cycle' : self.command_remove_cycle,
'remove task' : self.command_remove_task,
'hold suite now' : self.command_hold_suite,
'hold task now' : self.command_hold_task,
'set runahead' : self.command_set_runahead,
'set verbosity' : self.command_set_verbosity,
'purge tree' : self.command_purge_tree,
'reset task state' : self.command_reset_task_state,
'trigger task' : self.command_trigger_task,
'nudge suite' : self.command_nudge,
'insert task' : self.command_insert_task,
'reload suite' : self.command_reload_suite,
'add prerequisite' : self.command_add_prerequisite,
'poll tasks' : self.command_poll_tasks,
'kill tasks' : self.command_kill_tasks,
}
# run dependency negotation etc. after these commands
self.proc_cmds = [
'release suite',
'release task',
'kill cycle',
'kill task',
'set runahead',
'purge tree',
'reset task state',
'trigger task',
'nudge suite',
'insert task',
'reload suite',
'prerequisite'
]