drop check on shut down

Signed-off-by: Raffaele Di Fazio <raffo@github.com>
This commit is contained in:
Raffaele Di Fazio 2021-09-20 18:23:00 +02:00
parent c4f0eda96d
commit c222c3d696

View file

@ -261,7 +261,7 @@ func filterCodespacesToDelete(codespaces []*api.Codespace, keepThresholdDays int
if err != nil {
return nil, fmt.Errorf("error parsing last used at date: %w", err)
}
if t.Before(now().AddDate(0, 0, -keepThresholdDays)) && codespace.Environment.State == "Shutdown" {
if t.Before(now().AddDate(0, 0, -keepThresholdDays)) {
codespacesToDelete = append(codespacesToDelete, codespace)
}
}