orangeqs.juice.client.service#

Client functions for interacting with Juice services.

Module Contents#

Functions#

interrupt_service

Interrupt an OrangeQS Juice service by name.

restart_service

Restart an OrangeQS Juice service.

rebuild_service

Rebuild an OrangeQS Juice service by name.

API#

orangeqs.juice.client.service.interrupt_service(service_name: str) None#

Interrupt an OrangeQS Juice service by name.

Parameters#

  • service_name (str): The name of the service to interrupt. This should correspond to a valid OrangeQS Juice service or the “singleuser” environment.

orangeqs.juice.client.service.restart_service(service_name: str, method: Literal[full, partial] = 'full') None#

Restart an OrangeQS Juice service.

Parameters#

  • service_name (str): The name of the OrangeQS Juice service to restart.

  • method (“full” | “partial”, optional): The restart method to use. Defaults to “full”. - “full”: Restart the container running the service. This will use the newest version of the service image. Uses the Juice Orchestrator RPC. - “partial”: Restart the service process inside the container without restarting the container itself. Uses the Supervisor RPC inside the container.

orangeqs.juice.client.service.rebuild_service(service_name: str, mode: Literal[safe, force, dry - run] = 'safe') None#

Rebuild an OrangeQS Juice service by name.

Parameters#

  • service_name (str): The name of the service to rebuild. This should correspond to a valid OrangeQS Juice service or the “singleuser” environment.

  • mode (“safe” | “force” | “dry-run”, optional): The rebuild mode to use. Defaults to “safe”. - “safe”: Do a dry-run inside the service first, then rebuild if successful. - “force”: Rebuild the service directly without a dry-run. - “dry-run”: Only perform a dry-run inside the service.