Queues up tasks for execution
@param {any} testTasks Array of test tasks names
@param {any} buildTasks Array of build task names
427694
function queueTasks (testTasks, buildTasks) {
      // Queue up test tasks, removing them if already queued up
      _.forEach({ test: testTasks, build: buildTasks }, (queuingTasks, type) => {
        _.forEach(queuingTasks, (task) => {
          // Remove if already queued
          const removed = _.remove(queue[type], (queuedTask) => { return (queuedTask === task); });
          // Queue task ...
          queue[type].push(task);
          // Reorder tasks by original configuration ordering
          queue[type] = _.sortBy(queue[type], (queuedTask) => {
            return _.findIndex(orderedTasks, (originalTask) => {
              return (originalTask === queuedTask);
            });
          });
          // Prompt queued task
          console.log(`> ${removed.length ? 'Requeued' : 'Queued'} ${ type } task for execution: "${ task.blue }"`);
          console.log(`  Queue: ${ [...queue.test, ...queue.build].join(', ').gray }`);
        });
      });
      // Execute tasks from the queue
      executeQueuedTasks();
    }
418128
public function addThen(SequentialTask $t)
    {
        if ($this->thenTasks != null) {
            throw new BuildException("You must not nest more than one <then> into <if>");
        }
        $this->thenTasks = $t;
    }
118992
def run(task_creators, args, task_selectors=[]):
    
    if args.reset_dep:
        sys.exit(DoitMain(WrapitLoader(args, task_creators)).run(['reset-dep']))
    else:
        sys.exit(DoitMain(WrapitLoader(args, task_creators)).run(task_selectors))
490943
func (s *DescribeImportTasksOutput) SetTasks(v []*ImportTask) *DescribeImportTasksOutput {
	s.Tasks = v
	return s
}
714075
function doPlatformTask(owner, taskCallback) {
        var platforms = grunt.config.get('cordova_work_platforms');
        var platform;
        if (!!platforms && 0 < platforms.length) {
            platform = platforms.shift();
            // update variable.
            grunt.config.set('cordova_work_platforms', platforms);
            grunt.config.set('cordova_platform', platform);
            taskCallback();
            grunt.task.run(owner.nameArgs);
        }
    }
63294
function deleteTasks(_ref12, tasks) {
    var state = _ref12.state,
        commit = _ref12.commit,
        dispatch = _ref12.dispatch,
        rootState = _ref12.rootState;
    dispatch('SET_TASKS', null);
    return makeRequest(commit, rootState.c3s.client.apis.Tasks.delete_tasks, {
      tasks: tasks
    }, 'c3s/task/SET_TASKS');
  }
907474
function TaskRun(target) {
    this.name = target.name || 0;
    this.files = target.files || [];
    this._getConfig = target._getConfig;
    this.options = target.options;
    this.startedAt = false;
    this.spawned = null;
    this.changedFiles = Object.create(null);
    this.spawnTaskFailure = false;
    this.livereloadOnError = true;
    if (typeof this.options.livereloadOnError !== 'undefined') {
      this.livereloadOnError = this.options.livereloadOnError;
    }
  }
671741
def compute_tasks(self, **kwargs):
        
        params = self._prebuild(**kwargs)
        if not params:
            params = dict(kwargs)

        return self._build_tasks(**params)
543
public void addTask (ExecutorTask task)
    {
        for (int ii=0, nn=_queue.size(); ii < nn; ii++) {
            ExecutorTask taskOnQueue = _queue.get(ii);
            if (taskOnQueue.merge(task)) {
                return;
            }
        }

        // otherwise, add it on
        _queue.add(task);

        // and perhaps start it going now
        if (!_executingNow) {
            checkNext();
        }
    }
199007
function verifyTasks() {
      if ( options.tasks.build ) {
        if ( isTypeString(options.tasks.build) ) {
          options.tasks.build = [options.tasks.build];
        }
        if ( util.isArray(options.tasks.build) ) {
          options.tasks.build.forEach(function( item ) {
            if ( !isTypeString(item) ) {
              errorOption('tasks.build', JSON.stringify(item));
            }
          });
        }
        else {
          errorOption('tasks.build', options.tasks.build);
        }
      }
      else {
        options.tasks.build = [];
      }
    }
1327203
void startTaskTrackers(ClusterStory clusterStory, long now) {
    /** port assigned to TTs, incremented by 1 for each TT */
    int port = 10000;
    long ms = now + 100;

    for (MachineNode node : clusterStory.getMachines()) {
      String hostname = node.getName();
      RackNode rackNode = node.getRackNode();
      StaticMapping.addNodeToRack(hostname, rackNode.getName());
      String taskTrackerName = "tracker_" + hostname + ":localhost/127.0.0.1:"
          + port;
      port++;
      SimulatorTaskTracker tt = new SimulatorTaskTracker(jt, taskTrackerName,
          hostname, node.getMapSlots(), node.getReduceSlots());
      queue.addAll(tt.init(ms++));
    }
  }
326476
synchronized public void completeTask(int taskId, int partitionStoresMigrated) {
        tasksInFlight.remove(taskId);

        numTasksCompleted++;
        numPartitionStoresMigrated += partitionStoresMigrated;

        updateProgressBar();
    }
148427
function () {
      var arr = [].slice.call( arguments );
      var tasks = [];
      arr.forEach( function ( name ) {
        var prefixer = /^css-/.test( name ) ? 'css-target:' : 'js-target:';
        tasks.push( prefixer + name );
      } );
      grunt.task.run( tasks );
    }
532760
function(tasks, callback) {

      var keys; var length; var i; var results; var kind;
      var updated_tasks = [];
      var is_object;
      var counter = 0;

      if (isArray(tasks)) {

        length = tasks.length;
        results = [];

      } else if (isObject(tasks)) {

        is_object = true;
        keys = ObjectKeys(tasks);
        length = keys.length;
        results = {};

      } else {
        return callback();
      }

      for (i=0; i<length; i++) {

        if (is_object) {
          updated_tasks.push({ k: keys[i], t: tasks[keys[i]] });
        } else {
          updated_tasks.push({ k: i, t: tasks[i] });
        }

      }

      updated_tasks.forEach(function(task_object) {

        task_object.t(function(err, result) {
          if (err) return callback(err);

          results[task_object.k] = result;

          counter++;
          if (counter == length) callback(null, results);
        });

      });

    }
133087
public function build(array &$errors = null):array {
		$updatedTasks = [];
		foreach($this->taskList as $pathMatch => $task) {
			if($task->build($errors)) {
				$updatedTasks []= $task;
			}
		}

		return $updatedTasks;
	}
1297835
function addTask() {
        const task = newTask.value.trim();
        console.log("Adding task: " + task);

        // *****
        // *** we need to add a task to the fluence cluster after we pressed the `Add task` button
        // *****

        addTaskToFluence(task);

        updateTaskList(task)
    }
996270
private void addSinkTasks() {
    Runnable sinkTasks = new Runnable() {
      @Override
      public void run() {
        while (!metricsInSinkQueue.isEmpty()) {
          metricsSink.processRecord(metricsInSinkQueue.poll());
        }
      }
    };

    slaveLooper.addTasksOnWakeup(sinkTasks);
  }