// Heartbeat is sent to the service by the runner
Heartbeat is sent to the service by the runner
// Heartbeat is sent to the service by the runner
func (s RunnerService) Heartbeat(ctx context.Context, r api.RunnerStartRequest) (*api.RunnerStartResponse, error) {
	logger := s.logger.With(zap.String("runner", r.Runner), zap.Int("runner_id", int(r.ID)))
	logger.Debug("Retrieved heartbeat from runner")
	if err := s.DB.Model(&api.Runner{}).Where("id = ?", r.ID).Update("healthy_at", time.Now()).Error; err != nil {
		logger.Error("Failed to update healthy_at", zap.String("exception", err.Error()))
		return nil, fmt.Errorf("Failed to update healthy_at: %v", err)
	}
	return &api.RunnerStartResponse{}, nil
}
func ( s RunnerService ) Heartbeat ( ctx context . Context , r api . RunnerStartRequest ) ( * api . RunnerStartResponse , error ) { logger := s . logger . With ( zap . String ( " " , r . Runner ) , zap . Int ( " " , int ( r . ID ) ) ) logger . Debug ( " " ) if err := s . DB . Model ( & api . Runner { } ) . Where ( " " , r . ID ) . Update ( " " , time . Now ( ) ) . Error ; err != nil { logger . Error ( " " , zap . String ( " " , err . Error ( ) ) ) return nil , fmt . Errorf ( " " , err ) } return & api . RunnerStartResponse { } , nil }
Heartbeat is sent to the service by the runner
Heartbeat is sent to the service by the runner