diff --git a/os/gcron/gcron.go b/os/gcron/gcron.go index 8abe47423..7f45c4b2c 100644 --- a/os/gcron/gcron.go +++ b/os/gcron/gcron.go @@ -15,11 +15,11 @@ import ( ) const ( - StatusReady = gtimer.StatusReady - StatusRunning = gtimer.StatusRunning - StatusStopped = gtimer.StatusStopped - StatusClosed = gtimer.StatusClosed - gDEFAULT_TIMES = math.MaxInt32 + StatusReady = gtimer.StatusReady + StatusRunning = gtimer.StatusRunning + StatusStopped = gtimer.StatusStopped + StatusClosed = gtimer.StatusClosed + defaultTimes = math.MaxInt32 ) var ( diff --git a/os/gcron/gcron_entry.go b/os/gcron/gcron_entry.go index 9b9087639..94ff02f43 100644 --- a/os/gcron/gcron_entry.go +++ b/os/gcron/gcron_entry.go @@ -43,7 +43,7 @@ func (c *Cron) addEntry(pattern string, job func(), singleton bool, name ...stri cron: c, schedule: schedule, jobName: runtime.FuncForPC(reflect.ValueOf(job).Pointer()).Name(), - times: gtype.NewInt(gDEFAULT_TIMES), + times: gtype.NewInt(defaultTimes), Job: job, Time: time.Now(), } @@ -130,7 +130,7 @@ func (entry *Entry) check() { } } if times < 2000000000 && times > 1000000000 { - entry.times.Set(gDEFAULT_TIMES) + entry.times.Set(defaultTimes) } glog.Path(path).Level(level).Debugf("[gcron] %s(%s) %s start", entry.Name, entry.schedule.pattern, entry.jobName) defer func() {