Add a new task.

        Takes any of the keywords allowed by taskwarrior like proj or prior.
976736
def task_add(self, description, tags=None, **kw):
        

        task = self._stub_task(description, tags, **kw)

        task['status'] = Status.PENDING

        # TODO -- check only valid keywords

        if not 'entry' in task:
            task['entry'] = str(int(time.time()))

        if not 'uuid' in task:
            task['uuid'] = str(uuid.uuid4())

        id = self._task_add(task, Status.PENDING)
        task['id'] = id
        return task
315670
void add(TimerTask task) {
        // Grow backing store if necessary
        if (size + 1 == queue.length)
            queue = Arrays.copyOf(queue, 2*queue.length);

        queue[++size] = task;
        fixUp(size);
    }
380639
def extend(self, tasks):
        ''''''
        self._tasks.extend(tasks)
        for task in tasks:
            # We'll now go through all of our tasks and group them into
            # sub-shovels
            current = self.map
            modules = task.fullname.split('.')
            for module in modules[:-1]:
                if not isinstance(current[module], Shovel):
                    logger.warn('Overriding task %s with a module' %
                        current[module].file)
                    shovel = Shovel()
                    shovel.overrides = current[module]
                    current[module] = shovel
                current = current[module].map

            # Now we'll put the task in this particular sub-shovel
            name = modules[-1]
            if name in current:
                logger.warn('Overriding %s with %s' % (
                    '.'.join(modules), task.file))
                task.overrides = current[name]
            current[name] = task
967698
public void add(Task task) {
    	synchronized(LOCK) {
    		//terminated task will be selected immediately before start
    		task.setListener(this);
        
    		this.task[wi] = task;        
        
    		wi++;
    	}
    }
88476
def insert(self):
        
        from google.appengine.api.taskqueue import Queue

        task = self.to_task()

        Queue(name=self.get_queue()).add(task)
650589
def add_tasks(config, tasks_file, tasks_type, priority, redundancy):
    """"""
    res = _add_tasks(config, tasks_file, tasks_type, priority, redundancy)
    click.echo(res)
1137686
def add(self, *args, **kwargs):
        
        return self._apply(operator.add, *args, **kwargs)
1237014
function registerTask(Task, name, options) {
  if (this.tasks[name]) {
    log.error(new Error('Task "' + name + '" is already registered.'));
    return;
  }
  if (!Task || !Task.prototype || typeof Task.prototype.run !== 'function') {
    log.error(new Error('Task "' + name + '" should implement "run" method.'));
    return;
  }
  this.tasks[name] = new Task(options || []);
}
807659
void addTaskToChain(Task[] tasks, Task task, int index) {
        task.setNext(tasks[index]);
        tasks[index] = task;
    }
135976
def add_source(self, task_source):
		
		next_start = task_source.next_start()
		self.__sources[task_source] = next_start
		self.__update(task_source)
254545
void createTaskEntry(TaskAttemptID taskid, String taskTracker, TaskInProgress tip) {
    LOG.info("Adding task (" + tip.getAttemptType(taskid) + ") " +
      "'"  + taskid + "' to tip " +
      tip.getTIPId() + ", for tracker '" + taskTracker + "'");

    // taskid --> tracker
    taskidToTrackerMap.put(taskid, taskTracker);

    // tracker --> taskid
    Set<TaskAttemptIDWithTip> taskset = trackerToTaskMap.get(taskTracker);
    if (taskset == null) {
      taskset = new HashSet<TaskAttemptIDWithTip>();
      trackerToTaskMap.put(taskTracker, taskset);
    }
    taskset.add(new TaskAttemptIDWithTip(taskid, tip));

    // taskid --> TIP
    taskidToTIPMap.put(taskid, tip);

  }
136435
def insert(self, task, args=[], kwargs={}, delay_seconds=0):
    
    body = {
      "payload": task.payload(),
      "queueName": self._queue_name,
      "groupByTag": True,
      "tag": task.__class__.__name__
    }

    def cloud_insertion(api):
      api.insert(body, delay_seconds)

    if len(self._threads):
      self.put(cloud_insertion)
    else:
      cloud_insertion(self._api)

    return self
93101
def add_task(task)
      RRRSpec.redis.rpush(RRRSpec.make_key(key, 'tasks'), task.key)
      RRRSpec.redis.rpush(RRRSpec.make_key(key, 'tasks_left'), task.key)
    end
1222491
def put_task(self, task):
        ''''''
        _schedule = task.get('schedule', self.default_schedule)
        self.projects[task['project']].task_queue.put(
            task['taskid'],
            priority=_schedule.get('priority', self.default_schedule['priority']),
            exetime=_schedule.get('exetime', self.default_schedule['exetime'])
        )
1016540
public void addChildTaskBefore(Task child, Task previousSibling)
   {
      int index = m_children.indexOf(previousSibling);
      if (index == -1)
      {
         m_children.add(child);
      }
      else
      {
         m_children.add(index, child);
      }

      child.m_parent = this;
      setSummary(true);

      if (getParentFile().getProjectConfig().getAutoOutlineLevel() == true)
      {
         child.setOutlineLevel(Integer.valueOf(NumberHelper.getInt(getOutlineLevel()) + 1));
      }
   }
345600
public ItemRequest<Task> addSubtask(String task) {
    
        String path = String.format("/tasks/%s/subtasks", task);
        return new ItemRequest<Task>(this, Task.class, path, "POST");
    }
268195
def add_task(self, subject, status, **attrs):
        
        return Tasks(self.requester).create(
            self.project, subject, status,
            user_story=self.id, **attrs
        )