MCPcopy Create free account
hub / github.com/apache/mesos / processCheckResult

Method processCheckResult

src/checks/checker_process.cpp:427–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425
426
427void CheckerProcess::processCheckResult(
428 const Stopwatch& stopwatch,
429 const Result<CheckStatusInfo>& result)
430{
431 // `Checker` might have been paused while performing the check.
432 if (paused) {
433 LOG(INFO) << "Ignoring " << name << " result for"
434 << " task '" << taskId << "': checking is paused";
435 return;
436 }
437
438 // `result` will be:
439 //
440 // 1. `Some(CheckStatusInfo)` if it was possible to perform the check.
441 // 2. An `Error` if the check failed due to a non-transient error,
442 // e.g., timed out.
443 // 3. `None` if the check failed due to a transient error - this kind of
444 // failure will be silently ignored.
445 if (result.isSome()) {
446 // It was possible to perform the check.
447 VLOG(1) << "Performed " << name << " for task '" << taskId << "' in "
448 << stopwatch.elapsed();
449
450 updateCallback(result.get());
451 } else if (result.isError()) {
452 // The check failed due to a non-transient error.
453 updateCallback(Error(result.error()));
454 } else {
455 // The check failed due to a transient error.
456 LOG(INFO) << name << " for task '" << taskId << "' is not available";
457 }
458
459 scheduleNext(checkInterval);
460}
461
462
463Future<int> CheckerProcess::commandCheck(

Callers

nothing calls this directly

Calls 6

elapsedMethod · 0.80
errorMethod · 0.65
ErrorFunction · 0.50
isSomeMethod · 0.45
getMethod · 0.45
isErrorMethod · 0.45

Tested by

no test coverage detected