Add todos
This commit is contained in:
parent
a7afbea0b9
commit
9744d5c059
2 changed files with 2 additions and 0 deletions
|
|
@ -100,6 +100,7 @@ pub async fn get(
|
||||||
.into_response())
|
.into_response())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO Move to /admin/queue/add
|
||||||
pub async fn post_enqueue(
|
pub async fn post_enqueue(
|
||||||
Path(hash): Path<String>,
|
Path(hash): Path<String>,
|
||||||
State(config): State<&'static Config>,
|
State(config): State<&'static Config>,
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,7 @@ impl Workers {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn should_abort_work(&self, name: &str) -> bool {
|
pub fn should_abort_work(&self, name: &str) -> bool {
|
||||||
|
// TODO Abort if not in queue
|
||||||
let Some(info) = self.workers.get(name) else { return false; };
|
let Some(info) = self.workers.get(name) else { return false; };
|
||||||
let WorkerStatus::Working ( run) = &info.status else { return false; };
|
let WorkerStatus::Working ( run) = &info.status else { return false; };
|
||||||
let Some(oldest) = self.oldest_working_on(&run.hash) else { return false; };
|
let Some(oldest) = self.oldest_working_on(&run.hash) else { return false; };
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue