镜像自地址
https://github.com/tuna/tunasync.git
已同步 2025-12-06 06:26:46 +00:00
report next scheduled sync time
这个提交包含在:
@@ -15,6 +15,11 @@ type scheduleQueue struct {
|
||||
jobs map[string]bool
|
||||
}
|
||||
|
||||
type jobScheduleInfo struct {
|
||||
jobName string
|
||||
nextScheduled time.Time
|
||||
}
|
||||
|
||||
func timeLessThan(l, r interface{}) bool {
|
||||
tl := l.(time.Time)
|
||||
tr := r.(time.Time)
|
||||
@@ -28,6 +33,20 @@ func newScheduleQueue() *scheduleQueue {
|
||||
return queue
|
||||
}
|
||||
|
||||
func (q *scheduleQueue) GetJobs() (jobs []jobScheduleInfo) {
|
||||
cur := q.list.Iterator()
|
||||
defer cur.Close()
|
||||
|
||||
for cur.Next() {
|
||||
cj := cur.Value().(*mirrorJob)
|
||||
jobs = append(jobs, jobScheduleInfo{
|
||||
cj.Name(),
|
||||
cur.Key().(time.Time),
|
||||
})
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (q *scheduleQueue) AddJob(schedTime time.Time, job *mirrorJob) {
|
||||
q.Lock()
|
||||
defer q.Unlock()
|
||||
|
||||
在新工单中引用
屏蔽一个用户