nat.front_ends.fastapi.fastapi_front_end_plugin#
Attributes#
Classes#
Helper class that provides a standard way to create an ABC using |
Module Contents#
- logger#
- class FastApiFrontEndPlugin(full_config: nat.data_models.config.Config)#
Bases:
nat.front_ends.fastapi.dask_client_mixin.DaskClientMixin,nat.builder.front_end.FrontEndBase[nat.front_ends.fastapi.fastapi_front_end_config.FastApiFrontEndConfig]Helper class that provides a standard way to create an ABC using inheritance.
Initializes the FrontEndBase object with the specified NAT configuration.
Parameters#
- full_configConfig
The configuration object to use for the front end.
- _cluster = None#
- _periodic_cleanup_future = None#
- _scheduler_address = None#
- get_worker_class() type[nat.front_ends.fastapi.fastapi_front_end_plugin_worker.FastApiFrontEndPluginWorkerBase]#
- static _periodic_cleanup( )#
- Async:
- async _submit_cleanup_task( )#
Submit a cleanup task to the cluster to remove the job after expiry.
- static _setup_worker()#
Setup function to be run in each worker process. This moves each worker into it’s own process group. This fixes an issue where a Ctrl-C in the terminal sends a SIGINT to all workers, which then causes the workers to exit before the main process can shutdown the cluster gracefully.
- async run()#
Runs the specified configuration file, launching the workflow until the front end is complete.