ocpapi.workflows.context

ocpapi.workflows.context#

Functions#

set_context_var(→ Generator[None, None, None])

Sets the input convext variable to the input value and yields control

Module Contents#

ocpapi.workflows.context.set_context_var(context_var: contextvars.ContextVar, value: Any) Generator[None, None, None]#

Sets the input convext variable to the input value and yields control back to the caller. When control returns to this function, the context variable is reset to its original value.

Parameters:
  • context_var – The context variable to set.

  • value – The value to assign to the variable.