// SetServerActivity sets the runners server to inactive/active
SetServerActivity sets the runners server to inactive/active
// SetServerActivity sets the runners server to inactive / active
func (s RunnerService) SetServerActivity(runner api.Runner, active bool) error {
	if err := s.DB.Model(&api.Server{}).Where("hostname = ?", runner.Hostname).Update("active", active).Error; err != nil {
		s.logger.Error("Cannot set servers activity",
			zap.String("runner", runner.Name),
			zap.String("server", runner.Hostname),
			zap.String("exception", err.Error()),
		)
		return err
	}
	return nil
}
func ( s RunnerService ) SetServerActivity ( runner api . Runner , active bool ) error { if err := s . DB . Model ( & api . Server { } ) . Where ( " " , runner . Hostname ) . Update ( " " , active ) . Error ; err != nil { s . logger . Error ( " " , zap . String ( " " , runner . Name ) , zap . String ( " " , runner . Hostname ) , zap . String ( " " , err . Error ( ) ) , ) return err } return nil }
SetServerActivity sets the runners server to inactive/active
SetServerActivity sets the runners server to inactive / active