seq  3.0.0
Classes | Functions | Variables
cli.seqsh Namespace Reference

Classes

class  DummyRedis
 
class  SeqShell
 Asynchronous wrapper around the subprocess seq kernel. More...
 

Functions

def shutdown (loop, signal=None)
 
def handle_exception (loop, context)
 Cleanup tasks tied to the service's shutdown. More...
 
def mytask (loop, redis_address, log_level, evt, use_stdout=True, use_redis=True)
 Creates a SeqShell object and forwards arguments of the command to it. More...
 
def monitor_quit (quit_event)
 
def main_loop (redis_address, log_level=logging.INFO, use_stdout=True, use_redis=True)
 
def shell (redis_address, log_level, use_stdout=True, use_redis=False)
 

Variables

 LOGGER = logging.getLogger(__name__)
 

Function Documentation

◆ handle_exception()

def cli.seqsh.handle_exception (   loop,
  context 
)

Cleanup tasks tied to the service's shutdown.

exception handle

◆ main_loop()

def cli.seqsh.main_loop (   redis_address,
  log_level = logging.INFO,
  use_stdout = True,
  use_redis = True 
)
`seq shell` main loop

Parameters
----------

    redis_address : str
        Redis server address [host:]port
    log_level : str
        Minimum log level presented
    use_stdout : bool
    use_redis : bool
        Publishes feedback to redis server

◆ monitor_quit()

def cli.seqsh.monitor_quit (   quit_event)
waits for quit event

◆ mytask()

def cli.seqsh.mytask (   loop,
  redis_address,
  log_level,
  evt,
  use_stdout = True,
  use_redis = True 
)

Creates a SeqShell object and forwards arguments of the command to it.

Parameters

loop asyncio.AbstractEventLoop EventLoop in which the process management is done. See https://docs.python.org/3/library/asyncio-eventloop.html redis_address str Redis server address [host:]port log_level str Minimum log level presented evt asyncio.Event Event use_stdout bool use_redis bool Publishes feedback to redis server

◆ shell()

def cli.seqsh.shell (   redis_address,
  log_level,
  use_stdout = True,
  use_redis = False 
)
Sequencer shell function

When executing `seq shell`, seq.cli and click resolves into this function.

It forwards the arguments to a loop function.

Parameters
----------

    redis_address : str
        Redis server address [host:]port
    log_level : str
        Minimum log level presented
    use_stdout : bool
    use_redis : bool
        Publishes feedback to redis server

◆ shutdown()

def cli.seqsh.shutdown (   loop,
  signal = None 
)

Variable Documentation

◆ LOGGER

cli.seqsh.LOGGER = logging.getLogger(__name__)