Skip to content

Commit

Permalink
fix upid format and remove tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol committed Nov 18, 2024
1 parent 33780b1 commit 9057f01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/store/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ func (storeInstance *Store) GetMostRecentTask(ctx context.Context, job *Job) (ch
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) {
newTask, err := storeInstance.GetTaskByUPID(event.Name)
colonSplit := strings.Split(event.Name, ":")
actualUpid := colonSplit[:9]
newTask, err := storeInstance.GetTaskByUPID(strings.Join(actualUpid, ":") + ":")
if err != nil {
log.Printf("GetMostRecentTask: error getting tasks: %v\n", err)
return
Expand Down

0 comments on commit 9057f01

Please sign in to comment.