Delete a workflow.
423978
def delete(cls, uuid):
        """"""
        to_delete = Workflow.query.get(uuid)
        db.session.delete(to_delete)
1081504
def delete(self, event):
        """"""
        assert self.receiver_id == event.receiver_id
        event.response = {'status': 410, 'message': 'Gone.'}
        event.response_code = 410
1008499
public void terminateWorkflow(String workflowId, String reason) {
        Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank");
        delete(new Object[]{"reason", reason}, "workflow/{workflowId}", workflowId);
    }
299007
def clean(self):
        """"""
        for _, i in self.tasks.items():
            i.cancel()
        self._heartbeat_task.cancel()
        self._response_task.cancel()
940487
def delete(args):
  """"""
  jm = setup(args)
  # first, stop the jobs if they are running in the grid
  if not args.local and 'executing' in args.status:
    stop(args)
  # then, delete them from the database
  jm.delete(job_ids=get_ids(args.job_ids), array_ids=get_ids(args.array_ids), delete_logs=not args.keep_logs, delete_log_dir=not args.keep_log_dir, status=args.status)
1195235
public void removeWorkflow(String workflowId, boolean archiveWorkflow) {
        try {
            Workflow workflow = getWorkflowById(workflowId, true);

            // remove workflow from ES
            if (archiveWorkflow) {
                //Add to elasticsearch
                indexDAO.updateWorkflow(workflowId,
                        new String[]{RAW_JSON_FIELD, ARCHIVED_FIELD},
                        new Object[]{objectMapper.writeValueAsString(workflow), true});
            } else {
                // Not archiving, also remove workflowId from index
                indexDAO.removeWorkflow(workflowId);
            }

            // remove workflow from DAO
            try {
                executionDAO.removeWorkflow(workflowId);
            } catch (Exception ex) {
                Monitors.recordDaoError("executionDao", "removeWorkflow");
                throw ex;
            }

        } catch (Exception e) {
            throw new ApplicationException(ApplicationException.Code.BACKEND_ERROR, "Error removing workflow: " + workflowId, e);
        }
    }
611253
def delete(self):
        """"""
        if lib.EnvDeleteActivation(self._env, self._act) != 1:
            raise CLIPSError(self._env)

        self._env = None
390112
def delete(self, task_id):
    """"""
    if isinstance(task_id, RegisteredTask):
      task_id = task_id.id

    def cloud_delete(api):
      api.delete(task_id)

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

    return self
617700
def workflow_remove_stage(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/removeStage' % object_id, input_params, always_retry=always_retry, **kwargs)
841640
def delete(cls, **kwargs):
        '''
        
        '''
        q = cls._get_instance(**kwargs)
        if q:
            _action_and_commit(q, session.delete)
26878
def delete_file(self, filename):
        """"""
        log.info("deleting %s", filename)
        if not self.dry_run:
            os.unlink(filename)
506319
def terminate(self):
        """"""
        try:
            self.id2sims.terminate()
        except:
            pass
        import glob
        for fname in glob.glob(self.fname + '*'):
            try:
                os.remove(fname)
                logger.info("deleted %s" % fname)
            except Exception, e:
                logger.warning("failed to delete %s: %s" % (fname, e))
        for val in self.__dict__.keys():
            try:
                delattr(self, val)
            except:
                pass
1137437
def delete_document(project_id, knowledge_base_id, document_id):
    """"""
    import dialogflow_v2beta1 as dialogflow
    client = dialogflow.DocumentsClient()
    document_path = client.document_path(project_id, knowledge_base_id,
                                         document_id)

    response = client.delete_document(document_path)
    print('operation running:\n {}'.format(response.operation))
    print('Waiting for results...')
    print('Done.\n {}'.format(response.result()))
88440
def delete(method, hmc, uri, uri_parms, logon_required):
        """"""
        try:
            resource = hmc.lookup_by_uri(uri)
        except KeyError:
            raise InvalidResourceError(method, uri)
        resource.manager.remove(resource.oid)
948016
def cleanup(self, sched, coro):
        """"""
        try:
            sched.sigwait[self.name].remove((self, coro))
        except ValueError:
            pass
        return True
1257843
def workerCleanup(info):
        
        assert isinstance(info, WorkerCleanupInfo)
        workflowDir = Toil.getWorkflowDir(info.workflowID, info.workDir)
        workflowDirContents = os.listdir(workflowDir)
        shutdownFileStore(workflowDir, info.workflowID)
        if (info.cleanWorkDir == 'always'
            or info.cleanWorkDir in ('onSuccess', 'onError')
            and workflowDirContents in ([], [cacheDirName(info.workflowID)])):
            shutil.rmtree(workflowDir)
881066
def delete(self):
        """"""
        magic_identifier = unquote(self.get_id().identifier)
        orig_identifier = magic_identifier.split('?')[0]
        collection = JSONClientValidated('assessment_authoring',
                                         collection='AssessmentPart',
                                         runtime=self.my_osid_object._runtime)
        collection.delete_one({'_id': ObjectId(orig_identifier)})