fix: always return a list, even if we catch an exception
This commit is contained in:
@@ -455,8 +455,6 @@ class MemoryAdaptiveDispatcher(BaseDispatcher):
|
|||||||
|
|
||||||
# Update priorities for waiting tasks if needed
|
# Update priorities for waiting tasks if needed
|
||||||
await self._update_queue_priorities()
|
await self._update_queue_priorities()
|
||||||
|
|
||||||
return results
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if self.monitor:
|
if self.monitor:
|
||||||
@@ -467,6 +465,7 @@ class MemoryAdaptiveDispatcher(BaseDispatcher):
|
|||||||
memory_monitor.cancel()
|
memory_monitor.cancel()
|
||||||
if self.monitor:
|
if self.monitor:
|
||||||
self.monitor.stop()
|
self.monitor.stop()
|
||||||
|
return results
|
||||||
|
|
||||||
async def _update_queue_priorities(self):
|
async def _update_queue_priorities(self):
|
||||||
"""Periodically update priorities of items in the queue to prevent starvation"""
|
"""Periodically update priorities of items in the queue to prevent starvation"""
|
||||||
|
|||||||
Reference in New Issue
Block a user