mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
Reschedule before scan
This commit is contained in:
parent
1bd85d8baf
commit
bd5a64bac0
@ -775,8 +775,14 @@ func (s *apiSvc) postDBScan(w http.ResponseWriter, r *http.Request) {
|
||||
qs := r.URL.Query()
|
||||
folder := qs.Get("folder")
|
||||
if folder != "" {
|
||||
nextStr := qs.Get("next")
|
||||
next, err := strconv.Atoi(nextStr)
|
||||
if err == nil {
|
||||
s.model.DelayScan(folder, time.Duration(next)*time.Second)
|
||||
}
|
||||
|
||||
subs := qs["sub"]
|
||||
err := s.model.ScanFolderSubs(folder, subs)
|
||||
err = s.model.ScanFolderSubs(folder, subs)
|
||||
if err != nil {
|
||||
http.Error(w, err.Error(), 500)
|
||||
return
|
||||
@ -789,11 +795,6 @@ func (s *apiSvc) postDBScan(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
}
|
||||
nextStr := qs.Get("next")
|
||||
next, err := strconv.Atoi(nextStr)
|
||||
if err == nil {
|
||||
s.model.DelayScan(folder, time.Duration(next)*time.Second)
|
||||
}
|
||||
}
|
||||
|
||||
func (s *apiSvc) postDBPrio(w http.ResponseWriter, r *http.Request) {
|
||||
|
Loading…
Reference in New Issue
Block a user