Returns a clone of the ``ep`` profile. ``kwargs`` can be specified to update attributes of the returned profile. This is a shallow clone, so any objects referenced by the profile are shared. This means Load Balancing Policy is maintained by inclusion in the active
(self, ep, **kwargs)
| 3092 | return ep if isinstance(ep, ExecutionProfile) else self.get_execution_profile(ep) |
| 3093 | |
| 3094 | def execution_profile_clone_update(self, ep, **kwargs): |
| 3095 | """ |
| 3096 | Returns a clone of the ``ep`` profile. ``kwargs`` can be specified to update attributes |
| 3097 | of the returned profile. |
| 3098 | |
| 3099 | This is a shallow clone, so any objects referenced by the profile are shared. This means Load Balancing Policy |
| 3100 | is maintained by inclusion in the active profiles. It also means updating any other rich objects will be seen |
| 3101 | by the active profile. In cases where this is not desirable, be sure to replace the instance instead of manipulating |
| 3102 | the shared object. |
| 3103 | """ |
| 3104 | clone = copy(self._maybe_get_execution_profile(ep)) |
| 3105 | for attr, value in kwargs.items(): |
| 3106 | setattr(clone, attr, value) |
| 3107 | return clone |
| 3108 | |
| 3109 | def add_request_init_listener(self, fn, *args, **kwargs): |
| 3110 | """ |