From 5fbf3ad579ef1e151eb4474ac71b5bff244aa281 Mon Sep 17 00:00:00 2001 From: Son Roy Almerol Date: Sun, 17 Nov 2024 20:38:51 -0500 Subject: [PATCH] wait for non tmp log --- internal/store/tasks.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/store/tasks.go b/internal/store/tasks.go index 0c55113..469bbc5 100644 --- a/internal/store/tasks.go +++ b/internal/store/tasks.go @@ -127,8 +127,8 @@ func (storeInstance *Store) GetMostRecentTask(ctx context.Context, job *Job) (ch } } else { searchString := fmt.Sprintf(":backup:%s%shost-%s", job.Store, encodeToHexEscapes(":"), encodeToHexEscapes(backupId)) - log.Printf("Checking %s == %s\n", event.Name, searchString) - if strings.Contains(event.Name, searchString) { + log.Printf("Checking if %s contains %s\n", searchString, event.Name) + if !strings.Contains(event.Name, ".tmp_") && strings.Contains(event.Name, searchString) { fileName := filepath.Base(event.Name) colonSplit := strings.Split(fileName, ":") actualUpid := colonSplit[:9]