Skip to content

Documenting Communications Layer

Andrew Clark edited this page Jan 15, 2015 · 7 revisions

Comms Layer

Interfaces

Two interfaces used 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.

Commands for retrieving info from a suite

        # read-only commands to expose directly to the network
        self.info_commands = {
                'ping suite' : self.info_ping_suite,
                'ping task' : self.info_ping_task,
                'suite info' : self.info_get_suite_info,
                'task info' : self.info_get_task_info,
                'all families' : self.info_get_all_families,
                'triggering families' : self.info_get_triggering_families,
                'first-parent ancestors' : self.info_get_first_parent_ancestors,
                'first-parent descendants' : self.info_get_first_parent_descendants,
                'graph raw' : self.info_get_graph_raw,
                'task requisites' : self.info_get_task_requisites,
                'get cylc version' : self.info_get_cylc_version
                }

Commands for controlling the suite

        # 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'
            ]
Clone this wiki locally