Skip to content

Commit

Permalink
chore: add log
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-ding committed Jul 12, 2024
1 parent 5257b07 commit c12839d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ func (s *Server) checkTasks() {
log.Infof("task (%s) percentage done: %d%%", t.Name(), t.Progress())
if t.Progress() == 100 {
log.Infof("task is done: %v", t.Name())
go s.moveCompletedTask(id)
go func() {
if err := s.moveCompletedTask(id); err != nil {
log.Infof("post tasks for id %v fail: %v", id, err)
}
}()
}
}
}
Expand All @@ -45,6 +49,7 @@ func (s *Server) moveCompletedTask(id int) error {

series := s.db.GetSeriesDetails(r.SeriesID)
st := s.db.GetStorage(series.StorageID)
log.Infof("move task files to target dir: %v", r.TargetDir)
if st.Implementation == db.ImplWebdav {
storageImpl, err := storage.NewWebdavStorage(st.Path, st.User, st.Password)
if err != nil {
Expand Down

0 comments on commit c12839d

Please sign in to comment.