fix: remove stop command on delete

This commit is contained in:
2025-01-06 15:42:26 +00:00
parent de55d34086
commit 06f7beb26f
2 changed files with 5 additions and 5 deletions

View File

@ -228,7 +228,7 @@ impl Worker {
}
// delete vm if not paid (in new state)
if vm.expires < Utc::now().sub(Days::new(1)) && state.is_none() {
if !vm.deleted && vm.expires < Utc::now().sub(Days::new(1)) && state.is_none() {
info!("Deleting unpaid VM {}", vm.id);
self.provisioner.delete_vm(vm.id).await?;
}