jina.flow.mixin.control¶
-
class
jina.flow.mixin.control.
ControlFlowMixin
[source]¶ Bases:
object
The synchronous version of the Mixin for controlling, scaling the Flow
-
reload
(targets, on_done=None, on_error=None, on_always=None, **kwargs)[source]¶ Reload the executor of certain peas/pods in the Flow It will start a
CLIClient
and callreload()
.- Parameters
targets (
Union
[str
,Sequence
[str
]]) – the regex string or list of regex strings to match the pea/pod names.on_done (
Optional
[Callable
[…,None
]]) – the function to be called when theRequest
object is resolved.on_error (
Optional
[Callable
[…,None
]]) – the function to be called when theRequest
object is rejected.on_always (
Optional
[Callable
[…,None
]]) – the function to be called when theRequest
object is is either resolved or rejected.kwargs – accepts all keyword arguments of jina client CLI
- Returns
results
-