Skip to content

Commit

Permalink
chore: remove gitea schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
ztelliot committed Feb 28, 2024
1 parent a84cb0f commit a0989cf
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions manager/external/gitea.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/CQUPTMirror/kubesync/api/v1beta1"
"github.com/CQUPTMirror/kubesync/internal"
"github.com/CQUPTMirror/kubesync/manager/mirrorz"
"github.com/xhit/go-str2duration/v2"
"io"
"net/http"
"net/url"
Expand Down Expand Up @@ -48,9 +47,7 @@ func (r *giteaRepo) getStatusZ() string {
if r.Empty {
return "U"
} else {
t := r.getTime()
i, _ := str2duration.ParseDuration(r.Interval)
return fmt.Sprintf("S%dX%d", t.Unix(), t.Add(i).Unix())
return fmt.Sprintf("S%d", r.getTime().Unix())
}
}

Expand Down Expand Up @@ -106,8 +103,6 @@ func (p *giteaProvider) List() ([]internal.MirrorStatus, error) {

var ws []internal.MirrorStatus
for _, v := range info.Data {
t := v.getTime()
i, _ := str2duration.ParseDuration(v.Interval)
ws = append(ws, internal.MirrorStatus{
ID: v.Name,
Desc: v.Desc,
Expand All @@ -116,8 +111,7 @@ func (p *giteaProvider) List() ([]internal.MirrorStatus, error) {
SizeStr: internal.ParseSize(v.Size * internal.K),
JobStatus: v1beta1.JobStatus{
Status: v.getStatus(),
LastUpdate: t.Unix(),
Scheduled: t.Add(i).Unix(),
LastUpdate: v.getTime().Unix(),
Upstream: v.OriginalUrl,
Size: v.Size * internal.K,
},
Expand Down

0 comments on commit a0989cf

Please sign in to comment.