1
0
Fork 0
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:
postmannen 2022-02-23 12:32:21 +01:00
parent c863c12608
commit 279e8fbbab

View file

@ -1474,7 +1474,7 @@ func (m methodREQHttpGetScheduled) handler(proc process, message Message, node s
return
}
// schedulerTotalTime, err := strconv.Atoi(message.MethodArgs[2])
schedulerTotalTime, err := strconv.Atoi(message.MethodArgs[2])
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)
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.
// NB: Individual http get's will create their own context's
// 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() {
// Prepare the http request.