mirror of
https://github.com/postmannen/ctrl.git
synced 2024-12-14 12:37:31 +00:00
fixed timer error in httpGetScheduled
This commit is contained in:
parent
c863c12608
commit
279e8fbbab
1 changed files with 2 additions and 2 deletions
|
@ -1474,7 +1474,7 @@ func (m methodREQHttpGetScheduled) handler(proc process, message Message, node s
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// schedulerTotalTime, err := strconv.Atoi(message.MethodArgs[2])
|
schedulerTotalTime, err := strconv.Atoi(message.MethodArgs[2])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
er := fmt.Errorf("error: methodREQHttpGetScheduled: scheduler total time value is not a valid int number defined as a string value minutes: %v, bailing out: %v", err, message.MethodArgs)
|
er := fmt.Errorf("error: methodREQHttpGetScheduled: scheduler total time value is not a valid int number defined as a string value minutes: %v, bailing out: %v", err, message.MethodArgs)
|
||||||
proc.processes.errorKernel.errSend(proc, message, er)
|
proc.processes.errorKernel.errSend(proc, message, er)
|
||||||
|
@ -1490,7 +1490,7 @@ func (m methodREQHttpGetScheduled) handler(proc process, message Message, node s
|
||||||
// Prepare a context that will be for the schedule as a whole.
|
// Prepare a context that will be for the schedule as a whole.
|
||||||
// NB: Individual http get's will create their own context's
|
// NB: Individual http get's will create their own context's
|
||||||
// derived from this one.
|
// derived from this one.
|
||||||
ctxScheduler, cancel := context.WithTimeout(proc.ctx, time.Second*60)
|
ctxScheduler, cancel := context.WithTimeout(proc.ctx, time.Minute*time.Duration(schedulerTotalTime))
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
// Prepare the http request.
|
// Prepare the http request.
|
||||||
|
|
Loading…
Reference in a new issue