add update audit
This commit is contained in:
24
worker/orca-agent/tests/stages/update_audit.py
Normal file
24
worker/orca-agent/tests/stages/update_audit.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
"""Stage for executing worker tasks."""
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
|
||||||
|
def prepare(runner, worker):
|
||||||
|
"""Prepare data for worker task"""
|
||||||
|
|
||||||
|
return {
|
||||||
|
"taskId": runner.config.task_id,
|
||||||
|
"round": runner.current_round,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def execute(runner, worker, data):
|
||||||
|
"""Execute worker task step"""
|
||||||
|
url = f"{runner.config.middle_server_url}/summarizer/worker/update-audit-result"
|
||||||
|
response = requests.post(
|
||||||
|
url,
|
||||||
|
json=data,
|
||||||
|
)
|
||||||
|
response.raise_for_status()
|
||||||
|
|
||||||
|
return response.json()
|
Reference in New Issue
Block a user