mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 19:05:18 +00:00
feat: enhance GitHub polling with synchronous comment processing and improved logging
This commit is contained in:
parent
f0d780c7ec
commit
85754d2d79
1 changed files with 6 additions and 1 deletions
|
|
@ -206,12 +206,17 @@ async def polling_loop():
|
|||
else:
|
||||
get_logger().debug(f"Skipping comment processing for PR: {pr_url}")
|
||||
|
||||
max_allowed_parallel_tasks = 10
|
||||
if task_queue:
|
||||
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)
|
||||
processes.append(p)
|
||||
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()
|
||||
|
||||
# Dont wait for all processes to complete. Move on to the next iteration
|
||||
|
|
|
|||
Loading…
Reference in a new issue