Skip to content

Commit

Permalink
👋my geek time
Browse files Browse the repository at this point in the history
  • Loading branch information
zkep committed Jan 2, 2025
1 parent 850bf1b commit d4b6c52
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/task/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"errors"
"path"
"strconv"
"sync"
"time"
Expand Down Expand Up @@ -153,8 +154,9 @@ func doProduct(_ context.Context, x *model.Task) error {
UpdatedAt: time.Now().Unix(),
}
if status == service.TASK_STATUS_FINISHED {
dir := global.Storage.GetKey(x.TaskId, false)
message := task.TaskMessage{Object: dir}
dir := path.Join(x.TaskId, service.VerifyFileName(x.TaskName))
dirURL := global.Storage.GetKey(dir, false)
message := task.TaskMessage{Object: dirURL}
m.Message, _ = json.Marshal(message)
}
if err := global.DB.Where(&model.Task{Id: x.Id}).Updates(&m).Error; err != nil {
Expand Down

0 comments on commit d4b6c52

Please sign in to comment.