Consider Async for Network/Subprocess Calls #22

Open
opened 2026-02-02 14:52:27 -05:00 by jared · 0 comments
Owner

With many drives (50+), sequential SMART checks take time. Consider asyncio:

async def _check_drives_health_async(self):
tasks = [self._check_smart_health_async(disk) for disk in physical_disks]
results = await asyncio.gather(*tasks, return_exceptions=True)

This could reduce execution time from minutes to seconds.

With many drives (50+), sequential SMART checks take time. Consider asyncio: async def _check_drives_health_async(self): tasks = [self._check_smart_health_async(disk) for disk in physical_disks] results = await asyncio.gather(*tasks, return_exceptions=True) This could reduce execution time from minutes to seconds.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: LotusGuild/hwmonDaemon#22