Delete a training job.
774888
def delete(names, yes):
    
    failures = False
    for name in names:
        try:
            experiment = ExperimentClient().get(normalize_job_name(name))
        except FloydException:
            experiment = ExperimentClient().get(name)

        if not experiment:
            failures = True
            continue

        if not yes and not click.confirm("Delete Job: {}?".format(experiment.name),
                                         abort=False,
                                         default=False):
            floyd_logger.info("Job {}: Skipped.".format(experiment.name))
            continue

        if not ExperimentClient().delete(experiment.id):
            failures = True
        else:
            floyd_logger.info("Job %s Deleted", experiment.name)

    if failures:
        sys.exit(1)
461989
def cancel(self, job_ids):
        ''' 
        '''

        job_id_list = ' '.join(job_ids)
        retcode, stdout, stderr = self.channel.execute_wait("qdel {0}".format(job_id_list), 3)
        rets = None
        if retcode == 0:
            for jid in job_ids:
                self.resources[jid]['status'] = translate_table['E']  # Setting state to exiting
            rets = [True for i in job_ids]
        else:
            rets = [False for i in job_ids]

        return rets
893454
def delete(self):
        """"""
        self.__class__.objects.filter(pk=self.pk).delete()
1131437
def delete(self):
        """"""
        # set 'loaded' first ... so if we have to bail, we know we tried.
        self.loaded = True
        if not hasattr(self.manager, "delete"):
            return
        self.manager.delete(self)
1175784
def delete(self, data=None):
        """"""
        if not self.can_delete:
            raise JSSMethodNotAllowedError(self.__class__.__name__)
        if data:
            self.jss.delete(self.url, data)
        else:
            self.jss.delete(self.url)
12747
def cleanup(self):
        

        if hasattr(self, 'proactor'):
            if hasattr(self.proactor, 'scheduler'):
                del self.proactor.scheduler
            if hasattr(self.proactor, 'close'):
                self.proactor.close()
60083
synchronized void unschedule(String scheduledJobId) {
    try {
      quartzScheduler.deleteJob(new JobKey(scheduledJobId, SCHEDULED_JOB_GROUP));
    } catch (SchedulerException e) {
      String message = format("Error deleting ScheduledJob ''{0}''", scheduledJobId);
      LOG.error(message, e);
      throw new ScheduledJobException(message, e);
    }
  }
223642
def delete_job(self, job_name):
        
        logger.debug('Deleting job {0}'.format(job_name))
        for idx, job in enumerate(self.jobs):
            if job.name == job_name:
                self.backend.delete_job(job.job_id)
                del self.jobs[idx]
                self.commit()
                return
        raise DagobahError('no job with name %s exists' % job_name)
750022
function excuteJob(){
  let job = peekNextJob();
  let nextJob;

  while(!!job && (job.excuteTime()-Date.now())<accuracy){
    job.run();
    queue.pop();

    let nextTime = job.nextTime();

    if(nextTime === null){
      delete map[job.id];
    }else{
      queue.offer({id:job.id, time: nextTime});
    }
    job = peekNextJob();
  }

  //If all the job have been canceled
  if(!job)
    return;

  //Run next schedule
  setTimer(job);
}
929431
def clear(self, tag=None):
        
        if tag is None:
            del self.jobs[:]
        else:
            self.jobs[:] = (job for job in self.jobs if tag not in job.tags)
705417
def delete(self):
        
        logger.debug('Deleting Dagobah instance with ID {0}'.format(self.dagobah_id))
        self.jobs = []
        self.created_jobs = 0
        self.backend.delete_dagobah(self.dagobah_id)
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)
1348721
def CancelJob(r, job_id, dry_run=False):
    

    return r.request("delete", "/2/jobs/%s" % job_id,
                             query={"dry-run": dry_run})
178322
def remove(self, name):
        """"""
        self.gui.removeAction(self._actions_dict[name].qaction)
        del self._actions_dict[name]
        delattr(self, name)
578867
public function delete()
    {
        parent::delete();

        $this->database->deleteReserved($this->queue, $this->job->id);
    }
202607
def stop_job(self, job_id, array_id = None):
    """"""
    self.lock()

    job, array_job = self._job_and_array(job_id, array_id)
    if job is not None:
      if job.status in ('executing', 'queued', 'waiting'):
        logger.info("Reset job '%s' (%s) in the database", job.name, self._format_log(job.id))
        job.status = 'submitted'

      if array_job is not None and array_job.status in ('executing', 'queued', 'waiting'):
        logger.debug("Reset array job '%s' in the database", array_job)
        array_job.status = 'submitted'
      if array_job is None:
        for array_job in job.array:
          if array_job.status in ('executing', 'queued', 'waiting'):
            logger.debug("Reset array job '%s' in the database", array_job)
            array_job.status = 'submitted'

    self.session.commit()
    self.unlock()
237260
def delete_job(self, name, persist=True):
        '''
        
        '''
        # ensure job exists, then delete it
        if name in self.opts['schedule']:
            del self.opts['schedule'][name]
        elif name in self._get_schedule(include_opts=False):
            log.warning("Cannot delete job %s, it's in the pillar!", name)

        # Fire the complete event back along with updated list of schedule
        evt = salt.utils.event.get_event('minion', opts=self.opts, listen=False)
        evt.fire_event({'complete': True,
                        'schedule': self._get_schedule()},
                       tag='/salt/minion/minion_schedule_delete_complete')

        # remove from self.intervals
        if name in self.intervals:
            del self.intervals[name]

        if persist:
            self.persist()