Creates a new task with the given information in the list with the given ID
438973
def create_task(self, list_id, title, assignee_id=None, completed=None, recurrence_type=None, recurrence_count=None, due_date=None, starred=None):
        '''  '''
        return tasks_endpoint.create_task(self, list_id, title, assignee_id=assignee_id, completed=completed, recurrence_type=recurrence_type, recurrence_count=recurrence_count, due_date=due_date, starred=starred)
710814
public Task instantiateForInsert() {
		Task entity = new Task();
		entity.setIsCompleted(Boolean.FALSE);
		entity.setIsDeleted(Boolean.FALSE);
		entity.setIsPrivate(Boolean.FALSE);
		entity.setDateBegin(new DateTime());
		entity.setDateEnd(new DateTime());
		entity.setNotificationMinutes(0);
		entity.setDescription("Test Task created by REST");
		entity.setSubject("Task Created by REST");
		entity.setType("Unknown");
		return entity;
	}
1330859
public Long createTask(String taskName, String data, String key1, String key2, Long batchId) {
		FieldValidator.validateTaskData(data);
		FieldValidator.validateTaskKey1(key1);
		FieldValidator.validateTaskKey2(key2);
		TaskConfig tc = context.registry.getTaskConfig(taskName);
		if (tc == null)
			throw new IllegalArgumentException("Task '" + taskName + "' is not known for TED");
		return context.tedDao.createTask(taskName, tc.channel, data, key1, key2, batchId);
	}
354068
def _add_task(self, *args, **kwargs):
        
        task_id = kwargs['task_id']
        status = kwargs['status']
        runnable = kwargs['runnable']
        task = self._scheduled_tasks.get(task_id)
        if task:
            self._add_task_history.append((task, status, runnable))
            kwargs['owners'] = task._owner_list()

        if task_id in self._batch_running_tasks:
            for batch_task in self._batch_running_tasks.pop(task_id):
                self._add_task_history.append((batch_task, status, True))

        if task and kwargs.get('params'):
            kwargs['param_visibilities'] = task._get_param_visibilities()

        self._scheduler.add_task(*args, **kwargs)

        logger.info('Informed scheduler that task   %s   has status   %s', task_id, status)
1294759
private void createTasksForTable(Table table,
                                     List<DataTargetInfo> dataTargets,
                                     AtomicInteger numTables,
                                     SnapshotRegistry.Snapshot snapshotRecord,
                                     List<Long> hsids)
    {
        // srcHSId -> tasks
        Multimap<Long, SnapshotTableTask> tasks = ArrayListMultimap.create();
        for (DataTargetInfo targetInfo : dataTargets) {
            if (table.getIsreplicated() && !targetInfo.dataTarget.isReplicatedTableTarget()) {
                // For replicated tables only the lowest site's dataTarget actually does any work.
                // The other dataTargets just need to be tracked so we send EOF when all streams have finished.
                m_targets.add(targetInfo.dataTarget);
                continue;
            }
            final SnapshotTableTask task = createSingleTableTask(table, targetInfo, numTables, snapshotRecord);

            SNAP_LOG.debug("ADDING TASK for streamSnapshot: " + task);
            tasks.put(targetInfo.srcHSId, task);
        }

        placeTasksForTable(table, tasks, hsids);
    }
178642
public JSONObject getTaskInfo(int id, HashMap<String, String> options) {
        AipRequest request = new AipRequest();
        preOperation(request);
        
        request.addBody("id", id);
        if (options != null) {
            request.addBody(options);
        }
        request.setUri(KnowledgeGraphicConsts.TASK_INFO);
        postOperation(request);
        return requestServer(request);
    }
6488
def create_task(self, target: Callable[..., Any], *args: Any)\
            -> asyncio.tasks.Task:
        """"""
        if asyncio.iscoroutine(target):
            task = self._loop.create_task(target)
        elif asyncio.iscoroutinefunction(target):
            task = self._loop.create_task(target(*args))
        else:
            raise ValueError("Expected coroutine as target")
        self._pending_tasks.append(task)
        return task
1230890
def get_task(self, task_id):
        
        task = self.request_single('GetTask', {'id': task_id})

        if task:
            return zobjects.Task.from_dict(task)
        else:
            return None
714210
def _CreateTaskStorageWriter(self, path, task):
    
    return SQLiteStorageFileWriter(
        self._session, path,
        storage_type=definitions.STORAGE_TYPE_TASK, task=task)
731071
def get_tasks(client, list_id, completed=False):
    '''  '''
    params = { 
            'list_id' : str(list_id), 
            'completed' : completed 
            }
    response = client.authenticated_request(client.api.Endpoints.TASKS, params=params)
    return response.json()
349982
def action_create(self, courseid, taskid, path):
        
        # the path is given by the user. Let's normalize it
        path = path.strip()
        if not path.startswith("/"):
            path = "/" + path

        want_directory = path.endswith("/")

        wanted_path = self.verify_path(courseid, taskid, path, True)
        if wanted_path is None:
            return self.show_tab_file(courseid, taskid, _("Invalid new path"))

        task_fs = self.task_factory.get_task_fs(courseid, taskid)
        if want_directory:
            task_fs.from_subfolder(wanted_path).ensure_exists()
        else:
            task_fs.put(wanted_path, b"")
        return self.show_tab_file(courseid, taskid)
807659
void addTaskToChain(Task[] tasks, Task task, int index) {
        task.setNext(tasks[index]);
        tasks[index] = task;
    }
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);

  }
547755
private void readTasks(Integer id)
   {
      Integer currentID = id;
      Table table = getTable("WBSTAB");

      while (currentID.intValue() != 0)
      {
         MapRow row = table.find(currentID);
         Task task = m_projectFile.getTaskByUniqueID(row.getInteger("TASK_ID"));
         readLeafTasks(task, row.getInteger("FIRST_CHILD_TASK_ID"));
         Integer childID = row.getInteger("CHILD_ID");
         if (childID.intValue() != 0)
         {
            readTasks(childID);
         }
         currentID = row.getInteger("NEXT_ID");
      }
   }
1217140
def on_new_request(self, task):
        ''''''
        task['status'] = self.taskdb.ACTIVE
        self.insert_task(task)
        self.put_task(task)

        project = task['project']
        self._cnt['5m'].event((project, 'pending'), +1)
        self._cnt['1h'].event((project, 'pending'), +1)
        self._cnt['1d'].event((project, 'pending'), +1)
        self._cnt['all'].event((project, 'pending'), +1)
        logger.info('new task %(project)s:%(taskid)s %(url)s', task)
        return task
1067913
public Task createTask(String name, Map<String, Object> attributes) {
        return getInstance().create().task(name, this, attributes);
    }
498709
static <T extends IncrementalTask> IncrementalTaskState<T> create(
      String taskId, String jobId, long createTime, T initialTask) {
    return new IncrementalTaskState<>(taskId, jobId, createTime, new LockInfo(null, null),
        checkNotNull(initialTask), new Status(StatusCode.RUNNING));
  }