コード例 #1
0
 def __call__(self, selection):
     """Apply this read preference to Selection."""
     if selection.primary:
         return selection.primary_selection
     else:
         return secondary_with_tags_server_selector(
             self.tag_sets,
             max_staleness_selectors.select(self.max_staleness, selection))
コード例 #2
0
ファイル: read_preferences.py プロジェクト: rashed-bishal/IoT
 def __call__(self, selection):
     """Apply this read preference to Selection."""
     if selection.primary:
         return selection.primary_selection
     else:
         return secondary_with_tags_server_selector(
             self.tag_sets,
             max_staleness_selectors.select(
                 self.max_staleness, selection))
コード例 #3
0
 def __call__(self, selection):
     """Apply this read preference to Selection."""
     return member_with_tags_server_selector(
         self.tag_sets,
         max_staleness_selectors.select(
             self.max_staleness, selection))
コード例 #4
0
ファイル: read_preferences.py プロジェクト: rashed-bishal/IoT
 def __call__(self, selection):
     """Apply this read preference to Selection."""
     return member_with_tags_server_selector(
         self.tag_sets,
         max_staleness_selectors.select(
             self.max_staleness, selection))