orangeqs.juice.service._service#

OrangeQS Juice service base class and start method.

Module Contents#

Classes#

Service

Base class for OrangeQS Juice services.

SkipStdoutFilter

A logging filter that skips records meant to be excluded from stdout.

API#

class orangeqs.juice.service._service.Service(service_name: str)#

Bases: orangeqs.juice.service._task_server.TaskServer

Base class for OrangeQS Juice services.

This class can be extended to create specific service implementations. It provides a common interface for starting services.

Parameters#

  • service_name (str): The name of the service. Will be used to load the service configuration.

start() None#

Start the service.

This method can be overridden by subclasses to implement service-specific startup logic. Should always call super().start().

If you want to run asynchronous code, you should use self.loop to run your async functions.

class orangeqs.juice.service._service.SkipStdoutFilter(name='')#

Bases: logging.Filter

A logging filter that skips records meant to be excluded from stdout.

filter(record: logging.LogRecord) bool#

Determine if the specified record is to be logged.

Returns True if the record should be logged, or False otherwise. If deemed appropriate, the record may be modified in-place.