diff --git a/data.go b/data.go index 2184331..1bc5042 100644 --- a/data.go +++ b/data.go @@ -107,7 +107,6 @@ func (d *Data) getProject() { // filter out obsolete versions project = p.Projects[0] var versions Versions - log.Println("found", len(project.Versions), "versions") for _, v := range project.Versions { v := v if !v.Obsolete && !v.Released { @@ -127,7 +126,7 @@ func (d *Data) getProject() { d.Timestamp = time.Now() d.Project = project - fmt.Println("Got project details for", d.projectId, "with", len(d.Project.Versions), "version entries") + log.Println("Got project details for id", d.projectId, "with", len(d.Project.Versions), "version entries") } const statusFilter = `status%5B%5D=10&status%5B%5D=20&status%5B%5D=30&status%5B%5D=40&status%5B%5D=50&severity%5B%5D=20` @@ -203,7 +202,7 @@ func (d *Data) getIssues() { } d.Issues = issues d.Features = features - fmt.Println("Got", len(iss.Issues), "entries, of which", open, "are open and relevant:", len(features), "features and", len(issues), "issues") + log.Println("Got", len(iss.Issues), "entries, of which", open, "are open and relevant:", len(features), "features and", len(issues), "issues") } func (d *Data) Loop() { @@ -216,7 +215,7 @@ func (d *Data) Loop() { case <-d.ctx.Done(): return default: - fmt.Println("updating data") + log.Println("Updating data") d.getProject() d.getIssues() } diff --git a/main.go b/main.go index 05f120d..93b1e9b 100644 --- a/main.go +++ b/main.go @@ -35,8 +35,8 @@ var ( fl_token = flag.String("token", os.Getenv("MANTIS_API_TOKEN"), "API-Token") fl_port = flag.String("port", ":8080", "[ip]:port to serve") fl_num = flag.Int("num", 250, "number of issues to retrieve at once") - fl_min = flag.String("min", "0.9.3", "minimum version we care for") - fl_freq = flag.Duration("fr", time.Minute, "update frequency") + fl_min = flag.String("min", "0.9.1", "minimum version we care for") + fl_freq = flag.Duration("fr", 30*time.Minute, "update frequency") fl_proj = flag.Int("project", 23, "project id to use") )