Marks all targets in a task ready for execution if any target
        is not current.

        This is the default behavior for building only what's necessary.
512826
def make_ready_current(self):
        
        global print_prepare
        T = self.tm.trace
        if T: T.write(self.trace_message(u'Task.make_ready_current()',
                                         self.node))

        self.out_of_date = []
        needs_executing = False
        for t in self.targets:
            try:
                t.disambiguate().make_ready()
                is_up_to_date = not t.has_builder() or \
                                (not t.always_build and t.is_up_to_date())
            except EnvironmentError as e:
                raise SCons.Errors.BuildError(node=t, errstr=e.strerror, filename=e.filename)

            if not is_up_to_date:
                self.out_of_date.append(t)
                needs_executing = True

        if needs_executing:
            for t in self.targets:
                t.set_state(NODE_EXECUTING)
                for s in t.side_effects:
                    # add disambiguate here to mirror the call on targets in first loop above
                    s.disambiguate().set_state(NODE_EXECUTING)
        else:
            for t in self.targets:
                # We must invoke visited() to ensure that the node
                # information has been computed before allowing the
                # parent nodes to execute. (That could occur in a
                # parallel build...)
                t.visited()
                t.set_state(NODE_UP_TO_DATE)
                if (not print_prepare and
                    (not hasattr(self, 'options') or not self.options.debug_includes)):
                    t.release_target_info()
175840
@Override
	protected void applyAction(final SubordinateTarget target, final Object value) {
		// Should always be Boolean, but check anyway
		if (value instanceof Boolean) {
			applyMandatoryAction(target, ((Boolean) value));
		}
	}
255008
def kill_all(self):
        
        logger.info('Job {0} killing all currently running tasks'.format(self.name))
        for task in self.tasks.itervalues():
            if task.started_at and not task.completed_at:
                task.kill()
1159603
def execute(self):
    """"""
    relevant_targets = self._get_non_synthetic_targets(self.get_targets())

    if self.sideeffecting:
      # Always execute sideeffecting tasks without invalidation.
      self._execute_for(relevant_targets)
    else:
      # If the task is not sideeffecting we can use invalidation.
      with self.invalidated(relevant_targets) as invalidation_check:
        self._execute_for([vt.target for vt in invalidation_check.invalid_vts])
767189
public boolean all(Object... targets) {
		if (null == targets) { return null == this.delegate; }
		
		for (Object target : targets) {
			if (null == target) { if (null != this.delegate) { return false; } continue; }
			if (target != this.delegate) { return false; }
		}
		
		return true;
	}
332192
synchronized List<TaskTrackerAction> getTasksToKill(String taskTracker) {

    Set<TaskAttemptIDWithTip> taskset = trackerToTaskMap.get(taskTracker);
    List<TaskTrackerAction> killList = new ArrayList<TaskTrackerAction>();
    if (taskset != null) {
      for (TaskAttemptIDWithTip onetask : taskset) {
        TaskAttemptID killTaskId = onetask.attemptId;
        TaskInProgress tip = onetask.tip;

        if (tip == null) {
          continue;
        }
        if (tip.shouldClose(killTaskId)) {
          //
          // This is how the JobTracker ends a task at the TaskTracker.
          // It may be successfully completed, or may be killed in
          // mid-execution.
          //
          if (!((JobInProgress)tip.getJob()).isComplete()) {
            killList.add(new KillTaskAction(killTaskId));
            LOG.debug(taskTracker + " -> KillTaskAction: " + killTaskId);
          }
        }
      }
    }

    // add the stray attempts for uninited jobs
    synchronized (trackerToTasksToCleanup) {
      Set<TaskAttemptID> set = trackerToTasksToCleanup.remove(taskTracker);
      if (set != null) {
        for (TaskAttemptID id : set) {
          killList.add(new KillTaskAction(id));
        }
      }
    }
    return killList;
  }
1069421
@Override
	protected void applyAction(final SubordinateTarget target, final Object value) {
		if (value instanceof Boolean) {
			boolean visible = ((Boolean) value);
			target.setValidate(visible);
			((AbstractWComponent) target).setHidden(!visible);
		}
	}
277017
function() {
            if (_.size(this.tasks) > 0) {
                this.empty = false;
                var task = this.tasks.shift();
                this.startTask(task);
                this.trigger("tasks:next");
            } else {
                this.empty = true;
                this.trigger("tasks:finish");
            }      
        }
998732
public Collection<? extends Action> createFor(Run target) {
        if (target instanceof AbstractBuild)
            return createFor((AbstractBuild)target);
        else
            return Collections.emptyList();
    }
1170420
private List<T> finalizeCurrentBatch() {
    List<T> finalizedList;
    synchronized (items) {
      finalizedList = ImmutableList.copyOf(items);
      items.clear();
            /*
             * To avoid reprocessing being triggered on an empty list.
             */
      cancelTask(maxTask);
      cancelTask(idleTask);
    }
    return finalizedList;
  }
1319613
public void setTargets(java.util.Collection<String> targets) {
        if (targets == null) {
            this.targets = null;
            return;
        }

        this.targets = new java.util.ArrayList<String>(targets);
    }
440236
def compute_targets_to_build(self, targets: Iterable[str]) -> Iterable[BuildTarget]:
        
        normalized_targets = set()
        for target in targets:
            normalized_targets.update(self._normalize_target(target))

        targets_to_parse = deque(normalized_targets)
        targets_seen = set(normalized_targets)
        targets_not_found = []
        build_targets = set()

        while targets_to_parse:
            next_target_string = targets_to_parse.popleft()
            next_target = self._parse_target(next_target_string)
            build_file = self.parser.parse_file(next_target.build_file_directory)
            if next_target.name not in build_file.targets:
                targets_not_found.append(next_target_string)
                continue
            target_to_build = build_file.targets[next_target.name]
            build_targets.add(target_to_build)

            new_targets = [
                dependency
                for dependency in target_to_build.dependencies
                if dependency not in targets_seen
            ]
            targets_to_parse.extend(new_targets)
            targets_seen.update(new_targets)

        if targets_not_found and self.fail_on_unbuilt_target:
            raise BuilderException(
                "Target(s) could not be built: {}".format(", ".join(targets_not_found)),
                targets=targets_not_found,
            )
        return build_targets
629683
def verifyTargets(self):
        
        for layer in self.layers:
            if layer.verify and layer.type == 'Output' and layer.active and not layer.targetSet:
                raise LayerError('Targets are not set and verifyTargets() was called.',\
                                   (layer.name, layer.type))
            else:
                layer.resetTargetFlag()
1145179
def _mark_started(self):
        
        log = self._params.get('log', self._discard)

        now = time.time()
        self._started = now

        limit = self._config_running.get('time_limit')
        try:
            limit = float(_fmt_context(self._get(limit, default='0'), self._context))
            if limit > 0:
                log.debug("Applying task '%s' time limit of %s", self._name, deltafmt(limit))
                self._limit = now + limit
        except Exception as e:
            log.warn("Task '%s' time_limit value '%s' invalid -- %s",
                self._name, limit, e, exc_info=log.isEnabledFor(logging.DEBUG))
13912
def resolve(self):
        
        values = {}
        for target_name in self.target_names:
            if self.context.is_build_needed(self.parent, target_name):
                self.context.build_task(target_name)

            if len(self.keyword_chain) == 0:
                values[target_name] = self.context.tasks[target_name].value
            else:
                values[target_name] = reduce(
                    lambda task, name: getattr(task, name),
                    self.keyword_chain,
                    self.context.tasks[target_name].task)
        return self.function(**values)
22926
def build_task(current_target):
    

    target = current_target.config
    try:
        builder = _make_builder(target, current_target)
        build_path = _get_build_path(target, builder)
        if not os.path.exists(build_path):
            os.makedirs(build_path)
        builder.configure(src_dir=target.get("dp.src_dir"), build_dir=build_path)
        builder.build(build_dir=build_path)
        no_install = devpipeline_core.toolsupport.choose_tool_key(
            current_target, _NO_INSTALL_KEYS
        )
        if no_install not in target:
            install_path = target.get(
                devpipeline_core.toolsupport.choose_tool_key(
                    current_target, _INSTALL_PATH_KEYS
                ),
                fallback="install",
            )
            builder.install(build_dir=build_path, install_dir=install_path)
            _find_file_paths(target, os.path.join(build_path, install_path))
    except devpipeline_core.toolsupport.MissingToolKey as mtk:
        current_target.executor.warning(mtk)
196808
public void markTask(StatusTrail st, boolean success) {        
        st.setStatus(success ? JobStatus.done : JobStatus.not_done);
        st.setAttemptsDone(st.getAttemptsDone() + 1);
        st.setGivenUp(st.getAttemptsDone() >= getMaxTaskAttempts() ? 1 : 0);
        updateStatusTrail(st);
    }