// handle the error will not return an error
// just log the error
handle the error will not return an error
just log the error
// handle the error will not return an error // just log the error
func (r *run) handle(err error) {
	logger := r.queue.logger.With(
		zap.String("runner", r.runner.Name),
		zap.String("server", r.server.Hostname),
		zap.String("nms", r.nms.Address),
		zap.String("licence", r.runner.Licence),
		zap.Int("workers", int(r.runner.Workers)),
	)
	defer r.close()
	if err != nil {
		logger.Error("Runner failed", zap.String("exception", nuixError(err).Error()))
		port := os.Getenv("AVIAN_PORT")
		if port == "" {
			port = "8080"
		}
		url := fmt.Sprintf("http://%s:%s/oto/", "localhost", port)
		runnerService := avian.NewRunnerService(avian.New(url, ""))
		runnerService.Failed(
			context.Background(),
			avian.RunnerFailedRequest{
				ID:        r.runner.ID,
				Runner:    r.runner.Name,
				Exception: err.Error(),
			},
		)
		return
	}
	logger.Debug("Runner is executing")
	return
}
func ( r * run ) handle ( err error ) { logger := r . queue . logger . With ( zap . String ( " " , r . runner . Name ) , zap . String ( " " , r . server . Hostname ) , zap . String ( " " , r . nms . Address ) , zap . String ( " " , r . runner . Licence ) , zap . Int ( " " , int ( r . runner . Workers ) ) , ) defer r . close ( ) if err != nil { logger . Error ( " " , zap . String ( " " , nuixError ( err ) . Error ( ) ) ) port := os . Getenv ( " " ) if port == " " { port = " " } url := fmt . Sprintf ( " " , " " , port ) runnerService := avian . NewRunnerService ( avian . New ( url , " " ) ) runnerService . Failed ( context . Background ( ) , avian . RunnerFailedRequest { ID : r . runner . ID , Runner : r . runner . Name , Exception : err . Error ( ) , } , ) return } logger . Debug ( " " ) return }
handle the error will not return an error
just log the error
handle the error will not return an error just log the error
// handle the error