-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Any default handlers that are registered after the first request is run in a thread will be ignored. This is because the Runtime instance makes a copy of the default handlers when instantiated, so any new ones that are registered after the fact are not available to it.
MRE
from labrea.runtime import Request, current_runtime
_ = current_runtime() # Make sure a runtime is initialized
class VoidRequest(Request[None]):
def __init__(self):
pass
@VoidRequest.handle
def void_handler(request: VoidRequest) -> None:
return
VoidRequest().run() # This raises an error for no handler registeredMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working