Implement more /admin/queue/* endpoints

This commit is contained in:
Joscha 2023-08-14 12:18:43 +02:00
parent 1da946be10
commit 7f975a1fd0
4 changed files with 98 additions and 2 deletions

View file

@ -12,7 +12,10 @@ use axum_extra::routing::RouterExt;
use crate::somehow;
use self::{
admin::queue::post_admin_queue_add,
admin::queue::{
post_admin_queue_add, post_admin_queue_decrease, post_admin_queue_delete,
post_admin_queue_increase,
},
api::worker::{
get_api_worker_bench_repo_by_hash_tree_tar_gz, get_api_worker_repo_by_hash_tree_tar_gz,
post_api_worker_status,
@ -41,6 +44,9 @@ pub async fn run(server: Server) -> somehow::Result<()> {
.typed_get(get_run_by_id)
.typed_get(get_worker_by_name)
.typed_post(post_admin_queue_add)
.typed_post(post_admin_queue_decrease)
.typed_post(post_admin_queue_delete)
.typed_post(post_admin_queue_increase)
.typed_post(post_api_worker_status)
.fallback(get(r#static::static_handler))
.with_state(server.clone());