From 979fe2ebfea52fc0f6bb823be74cc2076fdae53f Mon Sep 17 00:00:00 2001 From: Jun Gong Date: Wed, 20 Mar 2019 09:17:44 +0800 Subject: [PATCH] Change run option SchedulePeriod's type to make it clear --- pkg/scheduler/scheduler.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/scheduler/scheduler.go b/pkg/scheduler/scheduler.go index 99f4da0d2..3e587370d 100644 --- a/pkg/scheduler/scheduler.go +++ b/pkg/scheduler/scheduler.go @@ -43,15 +43,14 @@ func NewScheduler( config *rest.Config, schedulerName string, conf string, - period string, + period time.Duration, defaultQueue string, ) (*Scheduler, error) { - sp, _ := time.ParseDuration(period) scheduler := &Scheduler{ config: config, schedulerConf: conf, cache: schedcache.New(config, schedulerName, defaultQueue), - schedulePeriod: sp, + schedulePeriod: period, } return scheduler, nil