Add a job to the queue of jobs.
777774
def issueJob(self, jobNode):
        """"""
        jobNode.command = ' '.join((resolveEntryPoint('_toil_worker'),
                                    jobNode.jobName,
                                    self.jobStoreLocator,
                                    jobNode.jobStoreID))
        # jobBatchSystemID is an int that is an incremented counter for each job
        jobBatchSystemID = self.batchSystem.issueBatchJob(jobNode)
        self.jobBatchSystemIDToIssuedJob[jobBatchSystemID] = jobNode
        if jobNode.preemptable:
            # len(jobBatchSystemIDToIssuedJob) should always be greater than or equal to preemptableJobsIssued,
            # so increment this value after the job is added to the issuedJob dict
            self.preemptableJobsIssued += 1
        cur_logger = logger.debug if jobNode.jobName.startswith(CWL_INTERNAL_JOBS) else logger.info
        cur_logger("Issued job %s with job batch system ID: "
                   "%s and cores: %s, disk: %s, and memory: %s",
                   jobNode, str(jobBatchSystemID), int(jobNode.cores),
                   bytes2human(jobNode.disk), bytes2human(jobNode.memory))
        if self.toilMetrics:
            self.toilMetrics.logIssuedJob(jobNode)
            self.toilMetrics.logQueueSize(self.getNumberOfJobsIssued())
1280310
function JobCallback (job) {
    if (job !== null) {
       job.gateway.Debug (6,"Queued Request:%s command=%s devid=%s [done]", job.request, job.command, job.devId);
    }
}
1109834
def handle_add(queue_name):
    """"""
    source = request.form.get('source', request.remote_addr, type=str)
    try:
        task_id = work_queue.add(
            queue_name,
            payload=request.form.get('payload', type=str),
            content_type=request.form.get('content_type', type=str),
            source=source,
            task_id=request.form.get('task_id', type=str))
    except work_queue.Error, e:
        return utils.jsonify_error(e)

    db.session.commit()
    logging.info('Task added: queue=%r, task_id=%r, source=%r',
                 queue_name, task_id, source)
    return flask.jsonify(task_id=task_id)
1310017
def run_with_output(self, *args, **kwargs):
    """"""
    for job in self.jobs:
      job.run_with_output(*args, **kwargs)
214684
def run_job(args):
  """"""
  jm = setup(args)
  job_id = int(os.environ['JOB_ID'])
  array_id = int(os.environ['SGE_TASK_ID']) if os.environ['SGE_TASK_ID'] != 'undefined' else None
  jm.run_job(job_id, array_id)
769202
function JobQueueActivate(queue, callback, timeout) {
        setTimeout(function () {queue.push (null, callback);}, timeout); // wait 5S before start
    }
366062
function addToSchedule(service, record) {
    if (record && record.schedule) {
        record.jobId = schedule.scheduleJob({
            start: Date.now() + record.delay,
            period: record.interval
        },
        doScheduleJob, {
            service: service,
            record: record
        });
    }
}
1296651
function JobQueue(para) {
	this.queue = [];
	this.curr = 0;
	this.all_passed = true;
	this.timeout = ((typeof para === 'object' && typeof para.timeout === 'number') ? para.timeout : 0);
}
453626
def job(func_or_queue, connection=None, *args, **kwargs):
    """"""
    decorated_func = _job(func_or_queue, connection=connection, *args, **kwargs)

    if callable(func_or_queue):
        @wraps(decorated_func)
        def wrapper(*args, **kwargs):
            with log.fields(uuid=uuid.uuid4(),
                            job_name=decorated_func.__name__):
                return decorated_func(*args, **kwargs)
        return wrapper
    else:
        def decorator(func):
            @decorated_func
            @wraps(func)
            def wrapper(*args, **kwargs):
                with log.fields(uuid=uuid.uuid4(),
                                job_name=func.__name__):
                    return func(*args, **kwargs)
            return wrapper
        return decorator
1249997
async def handle_client_new_job(self, client_addr, message: ClientNewJob):
        
        self._logger.info("Adding a new job %s %s to the queue", client_addr, message.job_id)
        self._waiting_jobs[(client_addr, message.job_id)] = message
        await self.update_queue()
904290
def put(self, body, priority=DEFAULT_PRIORITY, delay=0, ttr=DEFAULT_TTR):
        """"""
        assert isinstance(body, str), 'Job body must be a str instance'
        jid = self._interact_value('put %d %d %d %d\r\n%s\r\n' % (
                                       priority, delay, ttr, len(body), body),
                                   ['INSERTED'],
                                   ['JOB_TOO_BIG', 'BURIED', 'DRAINING'])
        return int(jid)
269709
def put(self, event, *args, **kwargs):
        
        self._queue.put((event, args, kwargs))
428512
def enqueue_job(self, job, prepend=False):
        
        push_method = getattr(self.waiting, 'lpush' if prepend else 'rpush')
        push_method(job.ident)
561312
def put(self, task, args, kwargs):
        
        if self.num_threads == 0:
            return task(*args, **kwargs)
        if self.queue is None:
            self._spawn()
        self.queue.put((task, args, kwargs))
306967
public function addJob($id, $job)
    {
        if (is_array($job)) {
            $job = Job::fromArray($job);
        }
        $this->incomingJobs[$id] = $job;
    }
1237834
@Override
  public void jobAdded(JobInProgress job) {
    synchronized (jobInitQueue) {
      jobInitQueue.add(job);
      resortInitQueue();
      jobInitQueue.notifyAll();
    }

  }
645278
public function queuePush(Job $job)
    {
        if ($this->isSingle()) {
            $queue_config = $this->getQueueConfig();
            if (isset($queue_config['driver'])) {
                /** @var BaseQueue $driver */
                $driver = $queue_config['driver'];
                $driver::component()->push($job);
            }
        }
    }