Skip to main content

on

Method
This is a method of the HookRegistry class in the registry module.
Decorator to register a function as a hook.

Signature

Parameters

HookEvent
required
The event to hook
Optional
Optional regex pattern to match targets
bool
default:"False"
Whether to run sequentially
float
default:"60.0"
Timeout in seconds

Returns

Callable
Decorator function

Usage

Uses

  • asyncio.iscoroutinefunction
  • register_function
  • func
  • wraps

Source

View on GitHub

praisonaiagents/hooks/registry.py at line 162