processing
parent
59b90f5c88
commit
75f4d5ef99
|
@ -96,8 +96,8 @@ func RobotFreeUpJobHandler() {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.AddSystemLog(rslogger.LogTypeError, "Robot %s job with id %s and name %s freed up because it was not correctly finished", robot.Name, robot.CurrentJobId, robot.CurrentJobName)
|
logger.AddSystemLog(rslogger.LogTypeError, "Robot %s job with id %s and name %s freed up after %v because it was not correctly finished", robot.Name, robot.CurrentJobId, robot.CurrentJobName, utils.RobotFreeUpJobInterval)
|
||||||
logger.AddRobotLog(rslogger.LogTypeError, robot.Type, robot.Id, "Job with id %s and name %s freed up because it was not correctly finished", robot.CurrentJobId, robot.CurrentJobName)
|
logger.AddRobotLog(rslogger.LogTypeError, robot.Type, robot.Id, "Job with id %s and name %s freed up after %v because it was not correctly finished", robot.CurrentJobId, robot.CurrentJobName, utils.RobotFreeUpJobInterval)
|
||||||
|
|
||||||
FreeUpJob(robot, utils.RobotStatusError)
|
FreeUpJob(robot, utils.RobotStatusError)
|
||||||
}
|
}
|
||||||
|
@ -156,11 +156,9 @@ func ProcessJobTask(r *structs.Robot, jobId string, jobName string) {
|
||||||
CountUpJobsWaiting(r, jobId, jobName)
|
CountUpJobsWaiting(r, jobId, jobName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// wait for current job to finish
|
||||||
for r.CurrentJobId != "" &&
|
for r.CurrentJobId != "" &&
|
||||||
r.CurrentJobId != jobId &&
|
r.CurrentJobId != jobId {
|
||||||
r.Status != utils.RobotStatusWaiting &&
|
|
||||||
r.Status != utils.RobotStatusError {
|
|
||||||
// wait for current job to finish
|
|
||||||
if r.Status == utils.RobotStatusOffline {
|
if r.Status == utils.RobotStatusOffline {
|
||||||
logger.AddRobotLog(rslogger.LogTypeError, r.Type, r.Id, "Job with id %s and name %s canceled", jobId, jobName)
|
logger.AddRobotLog(rslogger.LogTypeError, r.Type, r.Id, "Job with id %s and name %s canceled", jobId, jobName)
|
||||||
return
|
return
|
||||||
|
|
|
@ -116,6 +116,7 @@ func FinishControlRex(c *fiber.Ctx) error {
|
||||||
|
|
||||||
robot.UpdateRobotCurrentJob(r, "", "")
|
robot.UpdateRobotCurrentJob(r, "", "")
|
||||||
robot.CountDownJobsWaiting(r)
|
robot.CountDownJobsWaiting(r)
|
||||||
|
robot.UpdateRobotStatus(r, utils.RobotStatusIdle)
|
||||||
|
|
||||||
logger.AddRobotLog(rslogger.LogTypeInfo, utils.RobotTypeRex, r.Id, "Finish control robot")
|
logger.AddRobotLog(rslogger.LogTypeInfo, utils.RobotTypeRex, r.Id, "Finish control robot")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue