第二版

This commit is contained in:
ZhuJW
2026-03-13 18:12:31 +08:00
parent 078f928f75
commit 402adfdcd3
28 changed files with 2408 additions and 3068 deletions

22
check_error.py Normal file
View File

@@ -0,0 +1,22 @@
import requests
import time
# Start a task
print("Starting task...")
response = requests.post('http://localhost:8000/api/v1/sdlc/start', json={'requirement': 'test'})
task_id = response.json()['task_id']
print(f"Task ID: {task_id}")
# Wait 2 seconds
time.sleep(2)
# Get status
status = requests.get(f'http://localhost:8000/api/v1/sdlc/status/{task_id}')
print(f"\nStatus: {status.json()}")
# Get events via SSE stream
print("\nGetting events...")
stream = requests.get(f'http://localhost:8000/api/v1/sdlc/stream/{task_id}', timeout=5)
for line in stream.iter_lines():
if line:
print(line.decode('utf-8'))