mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 13:20:39 +08:00
feat: enhance GitHub polling with synchronous comment processing and improved logging
This commit is contained in:
@ -206,12 +206,17 @@ async def polling_loop():
|
|||||||
else:
|
else:
|
||||||
get_logger().debug(f"Skipping comment processing for PR: {pr_url}")
|
get_logger().debug(f"Skipping comment processing for PR: {pr_url}")
|
||||||
|
|
||||||
|
max_allowed_parallel_tasks = 10
|
||||||
if task_queue:
|
if task_queue:
|
||||||
processes = []
|
processes = []
|
||||||
for func, args in task_queue: # Create parallel tasks
|
for i, func, args in enumerate(task_queue): # Create parallel tasks
|
||||||
p = multiprocessing.Process(target=func, args=args)
|
p = multiprocessing.Process(target=func, args=args)
|
||||||
processes.append(p)
|
processes.append(p)
|
||||||
p.start()
|
p.start()
|
||||||
|
if i > max_allowed_parallel_tasks:
|
||||||
|
get_logger().error(
|
||||||
|
f"Dropping {len(task_queue) - max_allowed_parallel_tasks} tasks from polling session")
|
||||||
|
break
|
||||||
task_queue.clear()
|
task_queue.clear()
|
||||||
|
|
||||||
# Dont wait for all processes to complete. Move on to the next iteration
|
# Dont wait for all processes to complete. Move on to the next iteration
|
||||||
|
Reference in New Issue
Block a user