Skip to content

Commit

Permalink
add service_api /workflows/logs
Browse files Browse the repository at this point in the history
  • Loading branch information
fanlia committed Sep 12, 2024
1 parent 86b4375 commit 735230d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/controllers/service_api/app/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
)
from core.model_runtime.errors.invoke import InvokeError
from extensions.ext_database import db
from fields.workflow_app_log_fields import workflow_app_log_pagination_fields
from libs import helper
from models.model import App, AppMode, EndUser
from models.workflow import WorkflowRun
from services.app_generate_service import AppGenerateService
from fields.workflow_app_log_fields import workflow_app_log_pagination_fields
from services.workflow_app_service import WorkflowAppService

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -115,6 +115,7 @@ def post(self, app_model: App, end_user: EndUser, task_id: str):

return {"result": "success"}


class WorkflowAppLogApi(Resource):
@validate_app_token
@marshal_with(workflow_app_log_pagination_fields)
Expand All @@ -137,6 +138,7 @@ def get(self, app_model: App):

return workflow_app_log_pagination


api.add_resource(WorkflowRunApi, "/workflows/run")
api.add_resource(WorkflowRunDetailApi, "/workflows/run/<string:workflow_id>")
api.add_resource(WorkflowTaskStopApi, "/workflows/tasks/<string:task_id>/stop")
Expand Down

0 comments on commit 735230d

Please sign in to comment.