mirror of
https://github.com/simon-ding/polaris.git
synced 2026-06-07 10:37:39 +08:00
chore: add log
This commit is contained in:
@@ -30,7 +30,11 @@ func (s *Server) checkTasks() {
|
|||||||
log.Infof("task (%s) percentage done: %d%%", t.Name(), t.Progress())
|
log.Infof("task (%s) percentage done: %d%%", t.Name(), t.Progress())
|
||||||
if t.Progress() == 100 {
|
if t.Progress() == 100 {
|
||||||
log.Infof("task is done: %v", t.Name())
|
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)
|
||||||
|
}
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -45,6 +49,7 @@ func (s *Server) moveCompletedTask(id int) error {
|
|||||||
|
|
||||||
series := s.db.GetSeriesDetails(r.SeriesID)
|
series := s.db.GetSeriesDetails(r.SeriesID)
|
||||||
st := s.db.GetStorage(series.StorageID)
|
st := s.db.GetStorage(series.StorageID)
|
||||||
|
log.Infof("move task files to target dir: %v", r.TargetDir)
|
||||||
if st.Implementation == db.ImplWebdav {
|
if st.Implementation == db.ImplWebdav {
|
||||||
storageImpl, err := storage.NewWebdavStorage(st.Path, st.User, st.Password)
|
storageImpl, err := storage.NewWebdavStorage(st.Path, st.User, st.Password)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user