支持验收项目独立启动爬虫采集
This commit is contained in:
8
app.py
8
app.py
@@ -33,6 +33,7 @@ from acceptance_service import (
|
||||
create_acceptance_device,
|
||||
create_acceptance_task,
|
||||
collect_acceptance_now,
|
||||
collect_acceptance_crawler_now,
|
||||
get_acceptance_resources,
|
||||
get_acceptance_link_ai_data,
|
||||
get_acceptance_task,
|
||||
@@ -353,6 +354,13 @@ def create_app() -> Flask:
|
||||
def collect_project_acceptance_now(task_id: str):
|
||||
return jsonify({"data": collect_acceptance_now(task_id), "request_id": g.request_id}), 201
|
||||
|
||||
@app.route("/api/v1/acceptance-tasks/<task_id>/collect-crawler-now", methods=["POST"])
|
||||
def collect_project_acceptance_crawler_now(task_id: str):
|
||||
return jsonify({
|
||||
"data": collect_acceptance_crawler_now(task_id),
|
||||
"request_id": g.request_id,
|
||||
}), 201
|
||||
|
||||
@app.route("/api/v1/acceptance-tasks/<task_id>/retry-failed-devices", methods=["POST"])
|
||||
def retry_project_acceptance_failed_devices(task_id: str):
|
||||
return jsonify({
|
||||
|
||||
Reference in New Issue
Block a user