Skip to content

Commit

Permalink
Change: break on insufficient memory
Browse files Browse the repository at this point in the history
Instead of iterating and checking if there is enough memory available it
is breaking on the first occurence. This allows the scheduler to verify
later again.
  • Loading branch information
nichtsfrei committed Mar 6, 2024
1 parent 6e826f9 commit 22215d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/openvasd/src/scheduling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ where
let available_memory = sys.available_memory();
if available_memory < min_free_memory {
tracing::debug!(%min_free_memory, %available_memory, "insufficient memory to start a scan.");
continue;
break;
}
}
if let Some(scan_id) = queued.pop() {
Expand Down

0 comments on commit 22215d6

Please sign in to comment.