fermilink.cli.commands.gateway module

class fermilink.cli.commands.gateway.GatewayLoopConfig[source]

Bases: object

GatewayLoopConfig(package_id: ‘str | None’, sandbox: ‘str | None’, max_iterations: ‘int’, wait_seconds: ‘float’, max_wait_seconds: ‘float’, pid_stall_seconds: ‘float’, init_git: ‘bool’, hpc_profile: ‘str | None’ = None, loop_iteration_hook: ‘LoopIterationHook | None’ = None, workflow_status_hook: ‘WorkflowStatusHook | None’ = None)

__init__(package_id, sandbox, max_iterations, wait_seconds, max_wait_seconds, pid_stall_seconds, init_git, hpc_profile=None, loop_iteration_hook=None, workflow_status_hook=None)
Parameters:
  • package_id (str | None)

  • sandbox (str | None)

  • max_iterations (int)

  • wait_seconds (float)

  • max_wait_seconds (float)

  • pid_stall_seconds (float)

  • init_git (bool)

  • hpc_profile (str | None)

  • loop_iteration_hook (Callable[[int, int], None] | None)

  • workflow_status_hook (Callable[[str], None] | None)

Return type:

None

hpc_profile: str | None = None
init_git: bool
loop_iteration_hook: Callable[[int, int], None] | None = None
max_iterations: int
max_wait_seconds: float
package_id: str | None
pid_stall_seconds: float
sandbox: str | None
wait_seconds: float
workflow_status_hook: Callable[[str], None] | None = None
class fermilink.cli.commands.gateway.QueuedRunJob[source]

Bases: object

QueuedRunJob(job_id: ‘str’, chat_id: ‘str’, chat_key: ‘str’, prompt: ‘str’, mode: ‘str’, workspace_id: ‘str’, workspace_label: ‘str’, max_iterations: ‘int’, max_wait_seconds: ‘float’, queued_at_utc: ‘str’, run_generation: ‘int’)

__init__(job_id, chat_id, chat_key, prompt, mode, workspace_id, workspace_label, max_iterations, max_wait_seconds, queued_at_utc, run_generation)
Parameters:
  • job_id (str)

  • chat_id (str)

  • chat_key (str)

  • prompt (str)

  • mode (str)

  • workspace_id (str)

  • workspace_label (str)

  • max_iterations (int)

  • max_wait_seconds (float)

  • queued_at_utc (str)

  • run_generation (int)

Return type:

None

chat_id: str
chat_key: str
job_id: str
max_iterations: int
max_wait_seconds: float
mode: str
prompt: str
queued_at_utc: str
run_generation: int
workspace_id: str
workspace_label: str
class fermilink.cli.commands.gateway.TelegramInboundFile[source]

Bases: object

TelegramInboundFile(file_id: ‘str’, suggested_name: ‘str’)

__init__(file_id, suggested_name)
Parameters:
  • file_id (str)

  • suggested_name (str)

Return type:

None

file_id: str
suggested_name: str
fermilink.cli.commands.gateway.cmd_gateway(args)[source]

Execute the gateway CLI subcommand.

Parameters:

args (argparse.Namespace) – Parsed CLI arguments namespace for the subcommand.

Returns:

Process exit code (0 on user stop).

Return type:

int