Merge pull request #1530 from Sjoeborg/fix/arun-many-returns-none
Fix: run_urls() returns None, crashing arun_many()
This commit is contained in:
@@ -456,8 +456,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:
|
||||||
self.monitor.update_memory_status(f"QUEUE_ERROR: {str(e)}")
|
self.monitor.update_memory_status(f"QUEUE_ERROR: {str(e)}")
|
||||||
@@ -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"""
|
||||||
|
|||||||
@@ -563,7 +563,6 @@ async def handle_crawl_request(
|
|||||||
if isinstance(hook_manager, UserHookManager):
|
if isinstance(hook_manager, UserHookManager):
|
||||||
try:
|
try:
|
||||||
# Ensure all hook data is JSON serializable
|
# Ensure all hook data is JSON serializable
|
||||||
import json
|
|
||||||
hook_data = {
|
hook_data = {
|
||||||
"status": hooks_status,
|
"status": hooks_status,
|
||||||
"execution_log": hook_manager.execution_log,
|
"execution_log": hook_manager.execution_log,
|
||||||
|
|||||||
Reference in New Issue
Block a user