File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed
Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -233,19 +233,16 @@ func CleanBackupResources(restclient *rest.RESTClient, clientset *kubernetes.Cli
233233 return err
234234 }
235235
236- // if the pgBackRest backup pgtask exits, then delete it so that a new pgBackRest backup
236+ log .Debugf ("pgtask %s found was %t when cleaning backup resources prior to creating a " +
237+ "new backrest backup pgtask for cluster %s" , taskName , found , clusterName )
238+ // if the pgBackRest backup pgtask was found, then delete it so that a new pgBackRest backup
237239 // pgtask can be created in order to initiate a new backup
238240 if found {
239- log .Debugf ("pgtask %s was found when cleaning backup resources prior to creating a new " +
240- "backrest backup pgtask and will be deleted" , taskName )
241+ log .Debugf ("deleting pgtask %s for cluster %s" , taskName , clusterName )
241242 // delete the existing pgBackRest backup pgtask
242- err = kubeapi .Deletepgtask (restclient , taskName , namespace )
243- if err != nil {
243+ if err = kubeapi .Deletepgtask (restclient , taskName , namespace ); err != nil {
244244 return err
245245 }
246- } else {
247- log .Debugf ("pgtask %s was not found when cleaning backup resources prior to creating a " +
248- "new backrest backup pgtask" , taskName )
249246 }
250247
251248 //remove previous backup job
You can’t perform that action at this time.
0 commit comments