Class LocalCluster
Represents a local deployed HyperQueue infrastructure.
Declaration
class LocalCluster
source linkDocumentation
You can use LocalCluster to quickly spin up a HyperQueue server along with a set of workers locally.
The cluster can be used as a context manager. It will be stopped when the context ends:
with LocalCluster() as cluster:
    client = cluster.client()
    ...
# The cluster was stopped
Methods
- ▷ def __exit__(self, exc_type, exc_val, exc_tb)  
- ▶ def __init__(self, server_dir: Optional[Path] = None, ...)  - def-  __init__(  - self, - server_dir: Optional[Path] = None, - worker_config: Optional[WorkerConfig] = None, -  )  
 
- Parameters- server_dir: Optional[Path] 
 Server directory where will the cluster store its files. :param worker_config: Configuration of workers spawned in the cluster. 
 
- ▷ def client(self, **client_args) -> Client - Creates a client connected to this cluster. 
 
- ▷ def start_worker(self, config: WorkerConfig = None) - Adds a new worker with the given - configto the cluster.
 
 
- ▷ def stop(self) - Stops the server and all workers of this cluster. 
 
Reexports