@@ -366,13 +366,8 @@ def shutdown(self):
366366 async def _monitor_misc (self ):
367367 if self .misc_poll_interval is None :
368368 return
369- prev = await MiscData .gather ()
370- await self .info_sender .send (prev )
371369 while True :
372- curr = await MiscData .gather ()
373- if prev != curr :
374- prev = curr
375- await self .info_sender .send (curr )
370+ await self .info_sender .send (await MiscData .gather ())
376371 await anyio .sleep (self .misc_poll_interval )
377372
378373 async def _monitor_system_profiler_thunderbolt_data (self ):
@@ -382,15 +377,12 @@ async def _monitor_system_profiler_thunderbolt_data(self):
382377 if iface_map is None :
383378 return
384379
385- old_idents = []
386380 while True :
387381 data = await ThunderboltConnectivity .gather ()
388382 assert data is not None
389383
390384 idents = [it for i in data if (it := i .ident (iface_map )) is not None ]
391- if idents != old_idents :
392- await self .info_sender .send (MacThunderboltIdentifiers (idents = idents ))
393- old_idents = idents
385+ await self .info_sender .send (MacThunderboltIdentifiers (idents = idents ))
394386
395387 conns = [it for i in data if (it := i .conn ()) is not None ]
396388 await self .info_sender .send (MacThunderboltConnections (conns = conns ))
@@ -427,22 +419,17 @@ async def _monitor_gpu_info(self):
427419 async def _watch_system_info (self ):
428420 if self .interface_watcher_interval is None :
429421 return
430- old_nics = []
431422 while True :
432423 nics = await get_network_interfaces ()
433- if nics != old_nics :
434- old_nics = nics
435- await self .info_sender .send (NodeNetworkInterfaces (ifaces = nics ))
424+ await self .info_sender .send (NodeNetworkInterfaces (ifaces = nics ))
436425 await anyio .sleep (self .interface_watcher_interval )
437426
438427 async def _monitor_thunderbolt_bridge_status (self ):
439428 if self .thunderbolt_bridge_poll_interval is None :
440429 return
441- prev : ThunderboltBridgeInfo | None = None
442430 while True :
443431 curr = await ThunderboltBridgeInfo .gather ()
444- if curr is not None and prev != curr :
445- prev = curr
432+ if curr is not None :
446433 await self .info_sender .send (curr )
447434 await anyio .sleep (self .thunderbolt_bridge_poll_interval )
448435
0 commit comments