Skip to content

Commit

Permalink
Fix backupIsRunning.
Browse files Browse the repository at this point in the history
  • Loading branch information
sgielen committed Aug 1, 2024
1 parent a16741c commit 959f840
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/controller/pvcbackup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,9 @@ func (r *PVCBackupReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
}

func backupIsRunning(backup v1alpha1.PVCBackup) bool {
if backup.Status.StartedAt == nil || backup.Status.StartedAt.IsZero() {
return false
}
return backup.Status.FinishedAt != nil && !backup.Status.FinishedAt.IsZero()
started := backup.Status.StartedAt != nil && !backup.Status.StartedAt.IsZero()
finished := backup.Status.FinishedAt != nil && !backup.Status.FinishedAt.IsZero()
return started && !finished
}

func backupQualifiedName(backup v1alpha1.PVCBackup) string {
Expand Down

0 comments on commit 959f840

Please sign in to comment.