***** *** delete a task from fluence *****
777958
function deleteFromFluence(task) {
        const query = `DELETE FROM ${todoTable} WHERE task = '${task}'`;
        session.request(query).result().then((res) => {
            console.log("task deleted: " + res.asString());
        })
    }
917811
public void destroy() {
    context.removeVisualizationListener(this);
    context.removeResultListener(this);
    for(Entry<VisualizationTask, Visualization> v : taskmap.entrySet()) {
      Visualization vis = v.getValue();
      if(vis != null) {
        vis.destroy();
      }
    }
    taskmap.clear();
  }
904582
def clear(task = :default)
      return nil unless tasks.keys.include?(task)
      stop task
      tasks[task][:history].clear
    end
433904
@Override AutoBuffer call(AutoBuffer ab) {
    ab._h2o.remove_task_tracking(ab.getTask());
    return ab;
  }
77068
def remove(self, task_cls):
		
		registry_tag = task_cls.__registry_tag__
		if registry_tag in self.__registry.keys():
			self.__registry[registry_tag] = \
				list(filter(lambda x: x != task_cls, self.__registry[registry_tag]))
			if len(self.__registry[registry_tag]) == 0:
				self.__registry.pop(registry_tag)
1142327
final void destroyTaskJVM(TaskControllerContext context) {
    Thread taskJVMDestroyer = new Thread(new DestroyJVMTaskRunnable(context));
    taskJVMDestroyer.start();
    if (waitForConfirmedKill) {
      try {
        taskJVMDestroyer.join();
      } catch (InterruptedException e) {
        throw new IllegalStateException("destroyTaskJVM: Failed to join " +
            taskJVMDestroyer.getName());
      }
    }
  }
1084725
public void cancelQueuedTasks() {
      ArrayList<QueueingTask> queuedTasks = new ArrayList<QueueingTask>();
      queue.drainTo(queuedTasks);
      for (QueueingTask task : queuedTasks) {
         task.cancel(false);
      }
   }
841186
def stop(self):
        """"""
        self._end.value = True
        if self.background_process:
            try:
                self.background_process.terminate()
            except Exception:
                pass
        for task_id, values in self.current_tasks.items():
            try:
                values['proc'].terminate()
            except Exception:
                pass
991058
def _delete_tasks(config, task_id, limit=100, offset=0):
    """"""
    try:
        project = find_project_by_short_name(config.project['short_name'],
                                             config.pbclient,
                                             config.all)
        if task_id:
            response = config.pbclient.delete_task(task_id)
            check_api_error(response)
            return "Task.id = %s and its associated task_runs have been deleted" % task_id
        else:
            limit = limit
            offset = offset
            tasks = config.pbclient.get_tasks(project.id, limit, offset)
            while len(tasks) > 0:
                for t in tasks:
                    response = config.pbclient.delete_task(t.id)
                    check_api_error(response)
                offset += limit
                tasks = config.pbclient.get_tasks(project.id, limit, offset)
            return "All tasks and task_runs have been deleted"
    except exceptions.ConnectionError:
        return ("Connection Error! The server %s is not responding" % config.server)
    except (ProjectNotFound, TaskNotFound):
        raise
493124
def task_delete(self, **kw):
        
        def validate(task):
            if task['status'] == Status.DELETED:
                raise ValueError("Task is already deleted.")

        return self._task_change_status(Status.DELETED, validate, **kw)
1231036
def _stop(self):
        
        if self._started.isSet():
            # join threads
            self._pool_getter.join()
            self._pool_putter.join()
            for worker in self.pool:
                worker.join()
            # remove threads  
            del self._pool_putter
            del self._pool_getter
            del self.pool
            # remove results
            self._tasks = []
            self._tasks_tracked = {}
            # virgin variables
            self._stopping.clear()
            self._started.clear()
809014
boolean killTask(TaskAttemptID taskId, boolean shouldFail, String diagnosticInfo) {
    TaskStatus st = taskStatuses.get(taskId);
    if(st != null && (st.getRunState() == TaskStatus.State.RUNNING
        || st.getRunState() == TaskStatus.State.COMMIT_PENDING ||
        st.inTaskCleanupPhase() ||
        st.getRunState() == TaskStatus.State.UNASSIGNED)
        && tasksToKill.put(taskId, shouldFail) == null ) {
      addDiagnosticInfo(taskId, diagnosticInfo);
      LOG.info(diagnosticInfo);
      return true;
    }
    return false;
  }
548056
def _AbandonQueuedTasks(self):
    
    # Abandon all tasks after they're identified so as not to modify the
    # dict while iterating over it.
    tasks_to_abandon = []
    for task_identifier, task in iter(self._tasks_queued.items()):
      logger.debug('Abandoned queued task: {0:s}.'.format(task_identifier))
      tasks_to_abandon.append((task_identifier, task))

    for task_identifier, task in tasks_to_abandon:
      self._tasks_abandoned[task_identifier] = task
      del self._tasks_queued[task_identifier]
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');
  }
658646
def remove(self, uuid, project=None):
        
        uuid = uuid.split('@')[0]
        with self._lock:
            run(['task', 'rc.verbose=nothing', 'rc.data.location={self._data_location}'.format(**locals()), 'rc.confirmation=no', uuid, 'delete'])
1256739
private void swapAndCancelTask(AtomicReference<TimerTask> taskRef,
                                 TimerTask newTask) {
    TimerTask oldTask = taskRef.getAndSet(newTask);
    if (oldTask != null) {
      oldTask.cancel();
    }
  }
64687
private void purgeTask(TaskInProgress tip, boolean wasFailure)
  throws IOException {
    if (tip != null) {
      LOG.info("About to purge task: " + tip.getTask().getTaskID());

      // Remove the task from running jobs,
      // removing the job if it's the last task
      removeTaskFromJob(tip.getTask().getJobID(), tip);
      tip.jobHasFinished(wasFailure);
      if (tip.getTask().isMapTask()) {
        indexCache.removeMap(tip.getTask().getTaskID().toString());
      }
    }
  }