bartender.__main__#

Classes#

Formatter

Format help message for subcommands.

Functions#

serve(→ None)

Serve the web servce.

perform(→ None)

Runs arq worker to run queued jobs.

build_parser(→ argparse.ArgumentParser)

Build an argument parser.

add_generate_token_subcommand(→ None)

Add generate-token subcommand to parser.

add_link_job_subcommand(→ None)

Add the 'link' subcommand to the given subparsers.

main(→ None)

Entrypoint of the application.

Module Contents#

bartender.__main__.serve() None#

Serve the web servce.

Return type:

None

bartender.__main__.perform(config: pathlib.Path, destination_names: list[str] | None = None) None#

Runs arq worker to run queued jobs.

Like a bartender performing something entertaining, the i-vresse bartender performs by running queued jobs.

Parameters:
  • config (pathlib.Path) – Path to config file.

  • destination_names (Optional[list[str]]) – Name of destinations to run workers for. Each destination must have scheduler.type:arq. By default runs workers for all destinations with scheduler.type:arq.

Raises:

ValueError – When no valid destination is found in config file.

Return type:

None

bartender.__main__.build_parser() argparse.ArgumentParser#

Build an argument parser.

Returns:

parser

Return type:

argparse.ArgumentParser

class bartender.__main__.Formatter(prog, indent_increment=2, max_help_position=24, width=None)#

Bases: argparse.RawDescriptionHelpFormatter, argparse.ArgumentDefaultsHelpFormatter

Format help message for subcommands.

bartender.__main__.add_generate_token_subcommand(subparsers: Any) None#

Add generate-token subcommand to parser.

Parameters:

subparsers (Any) – Subparsers to add generate-token subcommand to.

Return type:

None

Add the ‘link’ subcommand to the given subparsers.

Parameters:

subparsers (Any) – The subparsers object to add the ‘link’ subcommand to.

Return type:

None

bartender.__main__.main(argv: list[str] = sys.argv[1:]) None#

Entrypoint of the application.

Parameters:

argv (list[str]) – Arguments to parse

Return type:

None