faust.cli.worker

Program faust worker used to start application from console.

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

Start worker instance for given app.

daemon = True
redirect_stdouts = 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=IntRange(1, 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='build-10233069-project-230058-faust', type=<class 'str'>, help='Canonical host name for the web server (default: 0.0.0.0)')]
options = [option('--with-web/--without-web', default=True, help='Enable/disable web server and related components.'), option('--web-port', '-p', default=None, type=IntRange(1, 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='build-10233069-project-230058-faust', 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=10.0, type=<class 'float'>, help='when --debug: Blocking detector timeout.'), option('--console-port', callback=<function compat_option.<locals>._callback>, expose_value=False, default=50101, type=IntRange(1, 65535), help='when --debug: Port to run debugger console on.')]
on_worker_created(worker: mode.worker.Worker) → None[source]

Print banner when worker starts.

Return type

None

as_service(loop: asyncio.events.AbstractEventLoop, *args: Any, **kwargs: Any) → mode.types.services.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: mode.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