You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now it is possible to specify default_timeout for process middleware, which will perform exactly this. DeadlineCountdown is an annotation, so need to rewrite it into a function that will return an annotation. The question is how to get this default_timeout from the parameter in DeadlineCountdown
Moreover, functions cannot be called in type annotations, so this needs to be implemented either through Annotated metadata or as a default parameter value, e.g, countdown: DeadlineCountdown = DefaultCountdown(float) or Annotated[DeadlineCountdown, DefaultCountdown(float)]. We can get signature from context.get("handler_"), but I don’t understand how to retrieve the “filtered” handler, and there may be more than one. It seems that the simplest way would be to implement a mapping of the subject to a default timeout in process middleware args
something like
The text was updated successfully, but these errors were encountered: