API Reference - Managers

Base Manager

BaseManager

class BaseManager

Abstract base class for task execution managers.

Methods:

start(*args, **kwargs)

Start the task manager server.

shutdown()

Shutdown the task manager server.

auto_load_all_task_modules()

Auto-discover and load all task modules in the project.

register_task_module(module_name: str, module: ModuleType)

Register a module containing event classes.

Parameters:
  • module_name – Fully qualified module name

  • module – Module object to register

Remote Managers

RemoteTaskManager

class RemoteTaskManager

Server that receives and executes tasks from RemoteExecutor clients. Supports SSL/TLS encryption and client certificate verification.

Parameters:

Parameters:
  • host – Server hostname/IP

  • port – Server port

  • cert_path – Path to server certificate

  • key_path – Path to server private key

  • ca_certs_path – Path to CA certificates

  • require_client_cert – Whether to require client certificates

  • socket_timeout – Socket timeout in seconds

Methods:

start()

Start the task manager with proper error handling.

shutdown()

Gracefully shutdown the task manager.

XMLRPCManager

class XMLRPCManager

XML-RPC server that handles remote task execution requests.

Parameters:

Parameters:
  • host – Server hostname/IP

  • port – Server port

  • use_encryption – Whether to use SSL/TLS

  • cert_path – Path to server certificate

  • key_path – Path to server private key

  • ca_certs_path – Path to CA certificates

  • require_client_cert – Whether to require client certificates

Methods:

start()

Start the RPC server.

execute(name: str, message: bytes) Any

Execute a function received via RPC.

Parameters:
  • name – Function name

  • message – Function pickled body

Returns:

Function result or error dict

shutdown()

Shutdown the RPC server.

GRPCManager

class GRPCManager

gRPC server that handles remote task execution requests.

Parameters:

Parameters:
  • host – Server hostname/IP

  • port – Server port

  • max_workers – Maximum worker threads

  • use_encryption – Whether to use SSL/TLS

  • server_cert_path – Path to server certificate

  • server_key_path – Path to server private key

  • require_client_cert – Whether to require client certificates

  • client_ca_path – Path to client CA certificate

Methods:

start()

Start the gRPC server.

shutdown()

Shutdown the gRPC server with a grace period.

TaskExecutorServicer

class TaskExecutorServicer

gRPC service implementation for task execution.

Methods:

Execute(request, context)

Execute a task and return the result.

Parameters:
  • request – Task execution request

  • context – RPC context

Returns:

Task execution response

ExecuteStream(request, context)

Execute a task with streaming status updates.

Parameters:
  • request – Task execution request

  • context – RPC context

Returns:

Stream of task status updates