faust.cli.worker

Program faust worker used to start application from console.

class faust.cli.worker.worker(ctx: Context, *args: Any, key_serializer: Optional[Union[CodecT, str]] = None, value_serializer: Optional[Union[CodecT, str]] = None, **kwargs: Any)[source]

Start worker instance for given app.

daemon: bool = True
redirect_stdouts: Optional[bool] = True
worker_options = [option('--with-web/--without-web', default=True, help='Enable/disable web server and related components.'), option('--web-port', '-p', default=None, type=<TCPPort 1<=x<=65535>, help='Port to run web server on (default: 6066)'), option('--web-transport', default=None, type=URL, help='Web server transport (default: tcp:)'), option('--web-bind', '-b', type=<class 'str'>), option('--web-host', '-h', default=None, type=<class 'str'>, help='Canonical host name for the web server (default: 0.0.0.0)')]
options: Optional[OptionList] = [option('--with-web/--without-web', default=True, help='Enable/disable web server and related components.'), option('--web-port', '-p', default=None, type=<TCPPort 1<=x<=65535>, help='Port to run web server on (default: 6066)'), option('--web-transport', default=None, type=URL, help='Web server transport (default: tcp:)'), option('--web-bind', '-b', type=<class 'str'>), option('--web-host', '-h', default=None, type=<class 'str'>, help='Canonical host name for the web server (default: 0.0.0.0)'), option('--logfile', '-f', callback=<function compat_option.<locals>._callback>, expose_value=False, default=None, type=<click.types.Path object>, help='Path to logfile (default is <stderr>).'), option('--loglevel', '-l', callback=<function compat_option.<locals>._callback>, expose_value=False, default='WARN', type=Choice(['crit', 'error', 'warn', 'info', 'debug']), help='Logging level to use.'), option('--blocking-timeout', callback=<function compat_option.<locals>._callback>, expose_value=False, default=None, type=<class 'float'>, help='when --debug: Blocking detector timeout.'), option('--console-port', callback=<function compat_option.<locals>._callback>, expose_value=False, default=50101, type=<TCPPort 1<=x<=65535>, help='when --debug: Port to run debugger console on.')]
on_worker_created(worker: Worker) None[source]

Print banner when worker starts.

Return type:

None

as_service(loop: AbstractEventLoop, *args: Any, **kwargs: Any) ServiceT[source]

Return the service this command should execute.

For the worker we simply start the application itself.

Note

The application will be started using a faust.Worker.

Return type:

ServiceT

banner(worker: Worker) str[source]

Generate the text banner emitted before the worker starts.

Return type:

str

faust_ident() str[source]

Return Faust version information as ANSI string.

Return type:

str

platform() str[source]

Return platform identifier as ANSI string.

Return type:

str

app: AppT
key_serializer: CodecArg

The codec used to serialize keys. Taken from instance parameters or key_serializer.

value_serialier: CodecArg

The codec used to serialize values. Taken from instance parameters or value_serializer.

debug: bool
quiet: bool
workdir: str
datadir: str
json: bool
logfile: str
stdout: IO
stderr: IO
args: Tuple
kwargs: Dict