Fix runners not disappearing
This commit is contained in:
parent
2079d0b12d
commit
b16b3a668e
5 changed files with 10 additions and 8 deletions
|
|
@ -35,9 +35,11 @@ impl Runners {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn clean(&mut self, now: OffsetDateTime) {
|
||||
pub fn clean(&mut self) -> &mut Self {
|
||||
let now = OffsetDateTime::now_utc();
|
||||
self.runners
|
||||
.retain(|_, v| now <= v.last_seen + self.config.web_runner_timeout)
|
||||
.retain(|_, v| now <= v.last_seen + self.config.web_runner_timeout);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn verify(&self, name: &str, secret: &str) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue