Add a check into the scheduler checks list

        :param check: check to add
        :type check: alignak.check.Check
        :return: None
160872
def add_check(self, check):
        
        if check is None:
            return
        if check.uuid in self.checks:
            logger.debug("Already existing check: %s", check)
            return
        logger.debug("Adding a check: %s", check)

        # Add a new check to the scheduler checks list
        self.checks[check.uuid] = check
        self.nb_checks += 1

        # Raise a brok to inform about a next check is to come ...
        # but only for items that are actively checked
        item = self.find_item_by_id(check.ref)
        if item.active_checks_enabled:
            self.add(item.get_next_schedule_brok())
596660
def load_and_check(self, base_settings, prompt=None):
        
        checker = Checker(self.file_name, self.section, self.registry, self.strategy_type, prompt)
        settings = self.load(base_settings)
        if checker.check(settings):
            return settings, True
        return None, False
1037515
def add_attempt(self):
        
        self.attempt += 1
        self.attempt = min(self.attempt, self.max_check_attempts)
1100163
func (p *Enforcer) AddCheck(name string, c Check) {
	p.checks[name] = c
}
1287218
def remove_in_progress_check(self, check):
        
        # The check is consumed, update the in_checking properties
        if check in self.checks_in_progress:
            self.checks_in_progress.remove(check)
        self.update_in_checking()
48791
public function addCheck(Check $check)
    {
        if ($this->hasCheck($check->getName())) {
            throw SchemaException::tableCheckAlreadyExists($this->getName(), $check->getName());
        }

        $this->checks[$check->getName()] = $check;
    }
171011
def apply_check_config(self, config):
        
        self.query = config.get("query")
        self.expected_response = config.get("response")
1332600
def init_check(self, check, obj):
        
        self.logger.info('Adding extension check %s' % check.__name__)
        check = functools.wraps(check)(functools.partial(check, obj))
        self.check(func=check)
585629
def checkbox_check(self, force_check=False):
        
        if not self.get_attribute('checked'):
            self.click(force_click=force_check)
731258
def check_in_periodically
      @check_in_thread = Thread.new do
        loop do
          check_on_workers
          reply = ""
          1.upto(5).each do | attempt_number |
            # sleep for an ever increasing amount of time to prevent overloading the server
            sleep CHECK_IN_INTERVAL * attempt_number
            reply = check_in
            # if we did not receive a reply, the server has went away; it
            # will reply with an empty string if the check-in succeeds
            if reply.nil?
              CloudCrowd.log "Failed on attempt ##{attempt_number} to check in with server"
            else
              break
            end
          end
          if reply.nil?
            CloudCrowd.log "Giving up after repeated attempts to contact server"
            raise SystemExit
          end
        end
      end
    end
840802
function(type, checks) {
		var result = false;
		var list = this._trackedtypes[type];
		if (!list) {
			list = this._trackedtypes[type] = [];
			result = true;
		} else {
			result = !this._haschecks(list, checks);
		}
		if (result && checks) {
			list.push(checks);
		}
		return result;
	}
1094843
def run_check(self, template_name=None, service_dir=None):
        "  "

        print_header('Check requirements', sep='-')
        map(lambda cmd: call("bash %s" % cmd), self._gen_scripts(
            'check', template_name=template_name, service_dir=service_dir))
        return True
244854
def update_check(self, entity, check, label=None, name=None, disabled=None,
            metadata=None, monitoring_zones_poll=None, timeout=None,
            period=None, target_alias=None, target_hostname=None,
            target_receiver=None):
        
        entity.update_check(check, label=label, name=name, disabled=disabled,
                metadata=metadata, monitoring_zones_poll=monitoring_zones_poll,
                timeout=timeout, period=period, target_alias=target_alias,
                target_hostname=target_hostname,
                target_receiver=target_receiver)
1303278
def pformat_check(success, checker, message):
    
    # TODO: Make this prettier.
    return "[{}] {}: {}".format("✓" if success else "✗", checker["checker"], message)
61838
public void setCheckInterval(long checkInterval)
  {
    if (checkInterval < 0 || checkInterval > Long.MAX_VALUE / 2)
      _checkInterval = Long.MAX_VALUE / 2;
    else
      _checkInterval = checkInterval;

    _lastCheckTime = 0;
  }
843129
def _do_check(self, obj, check_module, check_str):
        ''''''
        opts = self._config['options']
        if check_str in opts:
            fargs = opts[check_str]
            if isinstance(fargs, list):
                out = check_wrapper(getattr(check_module, check_str))(obj, *fargs)
            else:
                out = check_wrapper(getattr(check_module, check_str))(obj, fargs)
        else:
            out = check_wrapper(getattr(check_module, check_str))(obj)

        try:
            if out.info:
                L.debug('%s: %d failing ids detected: %s',
                        out.title, len(out.info), out.info)
        except TypeError:  # pragma: no cover
            pass

        return out
612673
def setCheckedDetails(self, checked):
        
        layout = self.layout()
        for i in range(layout.count()):
            w = layout.itemAt(i).widget()
            if w.stimType in checked:
                w.setChecked(checked[w.stimType])