Apply this read preference to Selection.
(self, selection: Selection)
| 343 | super().__init__(_PRIMARY_PREFERRED, tag_sets, max_staleness, hedge) |
| 344 | |
| 345 | def __call__(self, selection: Selection) -> Selection: |
| 346 | """Apply this read preference to Selection.""" |
| 347 | if selection.primary: |
| 348 | return selection.primary_selection |
| 349 | else: |
| 350 | return secondary_with_tags_server_selector( |
| 351 | self.tag_sets, max_staleness_selectors.select(self.max_staleness, selection) |
| 352 | ) |
| 353 | |
| 354 | |
| 355 | class Secondary(_ServerMode): |
nothing calls this directly
no test coverage detected