runs queue order manipulation and whitespace tightnening
This commit is contained in:
parent
a88eba7dd1
commit
99fd33f770
10 changed files with 478 additions and 121 deletions
12
repub/web.py
12
repub/web.py
|
|
@ -282,6 +282,16 @@ def create_app(*, dev_mode: bool = False) -> Quart:
|
|||
trigger_refresh(app)
|
||||
return Response(status=204)
|
||||
|
||||
@app.post("/actions/queued-executions/<int:execution_id>/move-up")
|
||||
async def move_queued_execution_up_action(execution_id: int) -> Response:
|
||||
get_job_runtime(app).move_queued_execution(execution_id, direction="up")
|
||||
return Response(status=204)
|
||||
|
||||
@app.post("/actions/queued-executions/<int:execution_id>/move-down")
|
||||
async def move_queued_execution_down_action(execution_id: int) -> Response:
|
||||
get_job_runtime(app).move_queued_execution(execution_id, direction="down")
|
||||
return Response(status=204)
|
||||
|
||||
@app.post("/job/<int:job_id>/execution/<int:execution_id>/logs")
|
||||
async def logs_patch(job_id: int, execution_id: int) -> DatastarResponse:
|
||||
async def render() -> Renderable:
|
||||
|
|
@ -311,7 +321,7 @@ def get_job_runtime(app: Quart) -> JobRuntime:
|
|||
if runtime is None:
|
||||
runtime = JobRuntime(
|
||||
log_dir=app.config["REPUB_LOG_DIR"],
|
||||
refresh_callback=lambda: trigger_refresh(app),
|
||||
refresh_callback=lambda event="refresh-event": trigger_refresh(app, event),
|
||||
)
|
||||
app.extensions[JOB_RUNTIME_KEY] = runtime
|
||||
return runtime
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue