(&mut self)
| 142 | } |
| 143 | |
| 144 | async fn handle_tick(&mut self) { |
| 145 | let old_list = std::mem::take(&mut self.pending_checks); |
| 146 | |
| 147 | for item in old_list { |
| 148 | if item.started.elapsed() > Duration::from_secs(10) { |
| 149 | if self.process_item(&item).await.is_err() { |
| 150 | // add back to queue if processing failed |
| 151 | self.pending_checks.push(item); |
| 152 | } |
| 153 | } else { |
| 154 | self.pending_checks.push(item); |
| 155 | } |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | async fn process_item(&mut self, item: &PendingCheckGroup) -> Result<(), ()> { |
| 160 | // TODO: only do this when they have actually changed |
nothing calls this directly
no test coverage detected