Ejemplo n.º 1
0
 async def _update_local_games(self):
     loop = asyncio.get_running_loop()
     new_list = await loop.run_in_executor(None, local_games_list)
     notify_list = get_state_changes(self._local_games_cache, new_list)
     self._local_games_cache = new_list
     for local_game_notify in notify_list:
         self.update_local_game_status(local_game_notify)
Ejemplo n.º 2
0
 async def _update_local_games(self):
     loop = asyncio.get_running_loop()
     new_list = await loop.run_in_executor(None, local_games_list)
     notify_list = get_state_changes(self._local_games_cache, new_list)
     self._local_games_cache = new_list
     for game in notify_list:
         if LocalGameState.Running in game.local_game_state:
             self._last_launch = time.time()
         self.update_local_game_status(game)
 async def _update_local_games(self):
     if time.time() < self._cooldown_timer:
         await asyncio.sleep(COOLDOWN_TIME)
     loop = asyncio.get_running_loop()
     new_list = await loop.run_in_executor(None, local_games_list)
     notify_list = get_state_changes(self._local_games_cache, new_list)
     self._local_games_cache = new_list
     for game in notify_list:
         if LocalGameState.Running in game.local_game_state:
             self._last_launch = time.time()
         self.update_local_game_status(game)
     self._cooldown_timer = time.time() + COOLDOWN_TIME