Submit the given command filename to the queue. Adapted from the qb3 example.
163050
def submit(command_filename, workingdir, send_mail = False, username = None):
    ''''''
    return sge_interface.submit(command_filename, workingdir, send_mail = send_mail, username = username)
265863
public void submit() {

        // create a JsArray containing the files to upload
        List<CmsFileInfo> filesToUpload = new ArrayList<CmsFileInfo>(getFilesToUpload().values());
        Collections.sort(filesToUpload, CmsFileInfo.INFO_COMPARATOR);

        CmsUploader uploader = new CmsUploader();
        uploader.uploadFiles(
            getUploadUri(),
            getTargetFolder(),
            m_isTargetRootPath,
            filesToUpload,
            getFilesToUnzip(false),
            this);
    }
1077557
def submit(self, job_id, directory, script=None):
        
        if job_id is None:
            job_id = '%s_%s_%s' % (Path(directory).unicodename,
                                   self.destination['username'],
                                   make_unique_name())
        else:
            check_jobid(job_id)

        queue = self._get_queue()
        if queue is None:
            queue = self._setup()

        if script is None:
            script = 'start.sh'

        # Create directory
        ret, target = self._call('%s %s' % (
                                 shell_escape(queue / 'commands/new_job'),
                                 job_id),
                                 True)
        if ret == 4:
            raise JobAlreadyExists
        elif ret != 0:
            raise JobNotFound("Couldn't create job")
        target = PosixPath(target)
        logger.debug("Server created directory %s", target)

        # Upload to directory
        try:
            scp_client = self.get_scp_client()
            scp_client.put(str(Path(directory)),
                           str(target),
                           recursive=True)
        except BaseException as e:
            try:
                self.delete(job_id)
            except BaseException:
                raise e
            raise
        logger.debug("Files uploaded")

        # Submit job
        self.check_call('%s %s %s %s' % (
                        shell_escape(queue / 'commands/submit'),
                        job_id, shell_escape(target),
                        shell_escape(script)))
        logger.info("Submitted job %s", job_id)
        return job_id
173607
def _send(self, command):
        
        command = command.encode('utf-8')
        log.debug('>> ' + command)
        self.conn.oqueue.put(command)
20413
def send_simple_command(self, cmd):
        """"""
        pkt = MqttPkt()
        
        pkt.command = cmd
        pkt.remaining_length = 0
        
        ret = pkt.alloc()
        if ret != NC.ERR_SUCCESS:
            return ret
        
        return self.packet_queue(pkt)
1036049
def submit_create_and_upload(self, halt_on_error=True):
        
        # check global setting for override
        if self.halt_on_batch_error is not None:
            halt_on_error = self.halt_on_batch_error

        content = self.data
        # store the length of the batch data to use for poll interval calculations
        self.tcex.log.info('Batch Group Size: {:,}.'.format(len(content.get('group'))))
        self.tcex.log.info('Batch Indicator Size {:,}.'.format(len(content.get('indicator'))))
        if self.debug:
            # special code for debugging App using batchV2.
            self.write_batch_json(content)
        if content.get('group') or content.get('indicator'):
            try:
                files = (('config', json.dumps(self.settings)), ('content', json.dumps(content)))
                params = {'includeAdditional': 'true'}
                r = self.tcex.session.post('/v2/batch/createAndUpload', files=files, params=params)
                self.tcex.log.debug('Batch Status Code: {}'.format(r.status_code))
                if not r.ok or 'application/json' not in r.headers.get('content-type', ''):
                    self.tcex.handle_error(10510, [r.status_code, r.text], halt_on_error)
                return r.json()
            except Exception as e:
                self.tcex.handle_error(10505, [e], halt_on_error)
        return {}
233457
private synchronized void submit(final String command) {
    LOG.log(Level.INFO, "Submit command {0} to {1} evaluators. state: {2}",
        new Object[]{command, this.contexts.size(), this.state});
    assert this.state == State.READY;
    this.expectCount = this.contexts.size();
    this.state = State.WAIT_TASKS;
    this.cmd = null;
    for (final ActiveContext context : this.contexts.values()) {
      this.submit(context, command);
    }
  }
1183700
def submit(self, call, *args, **kwargs):
        
        future = StoredFuture(call, *args, **kwargs)
        self._queue.put(future)
        self._ensure_worker()
        return future
116811
def submit(jman, command, arguments, deps=[], array=None):
  """"""

  logdir = os.path.join(os.path.realpath(arguments.logdir),
      tools.random_logdir())

  jobname = os.path.splitext(os.path.basename(command[0]))[0]
  cmd = tools.make_shell(sys.executable, command)

  if arguments.dryrun:
    return DryRunJob(cmd, cwd=arguments.cwd, queue=arguments.queue,
        hostname=arguments.hostname, memfree=arguments.memfree,
        hvmem=arguments.hvmem, gpumem=arguments.gpumem, pe_opt=arguments.pe_opt,
        stdout=logdir, stderr=logdir, name=jobname, deps=deps,
        array=array)
  
  # really submit
  return jman.submit(cmd, cwd=arguments.cwd, queue=arguments.queue,
      hostname=arguments.hostname, memfree=arguments.memfree,
      hvmem=arguments.hvmem, gpumem=arguments.gpumem, pe_opt=arguments.pe_opt,
      stdout=logdir, stderr=logdir, name=jobname, deps=deps,
      array=array)
396892
def write_file_to_descriptor(input_queue, descriptor):
    
    try:
        file_name = input_queue.get(timeout=2)
        descriptor.write("{}\n".format(file_name))
        descriptor.flush()
        input_queue.task_done()
        return True
    except Empty:
        # no more files in queue
        descriptor.close()
        return False
    except IOError:
        return False
703021
protected function submitCommandFileManager()
    {
        $result = $this->command->submit($this->data_command, array($this));
        $this->setMessageFileManager($result['message'], $result['severity'], true);
        $this->session->delete('file_manager_selected');
        $this->redirect($result['redirect']);
    }
829990
def make_submit_job(shell, output, job_type):
    
    run_cmd = [shell, output]
    submit_command = Command(alias=PIPELINE_ALIAS, cmds=run_cmd)
    submit_job = get_job(submit_command, job_type)
    submit_job.make()
    return submit_job
625918
def submit(script, workspace, **params):
    """"""
    from klab import cluster, process

    # Make sure the rosetta symlink has been created.

    if not os.path.exists(workspace.rosetta_dir):
        raise pipeline.RosettaNotFound(workspace)

    # Parse some job parameters for the keyword arguments.

    params = dict((k, v) for k, v in params.items() if v is not None)
    test_run = params.get('test_run', False)
    nstruct = params.get('nstruct')
    max_runtime = params.get('max_runtime', '6:00:00')
    max_memory = params.get('max_memory', '1G')

    if test_run:
        nstruct = 1

    if nstruct is None:
        raise TypeError("submit() requires the keyword argument 'nstruct' for production runs.")

    # Use Jinja to render the XML script that will be passed to rosetta.

    finalize_protocol(workspace, params)

    # Submit the job and put it immediately into the hold state.

    qsub_command = 'qsub', '-h', '-cwd',
    qsub_command += '-o', workspace.log_dir,
    qsub_command += '-j', 'y',
    qsub_command += '-t', '1-{0}'.format(nstruct),
    qsub_command += '-l', 'h_rt={0}'.format(max_runtime),
    qsub_command += '-l', 'mem_free={0}'.format(max_memory),
    qsub_command += pipeline.big_job_path(script),
    qsub_command += workspace.focus_dir,

    status = process.check_output(qsub_command)
    status_pattern = re.compile(r'Your job-array (\d+).[0-9:-]+ \(".*"\) has been submitted')
    status_match = status_pattern.match(status)

    if not status_match:
        print status
        sys.exit()

    # Figure out the job id, then make a params file specifically for it.

    job_id = status_match.group(1)

    with open(workspace.job_info_path(job_id), 'w') as file:
        json.dump(params, file)

    # Release the hold on the job.

    qrls_command = 'qrls', job_id
    process.check_output(qrls_command)
    print status,
1193397
private void queueUpload(String key, File file) {
        if (mUploadQueue == null)
            mUploadQueue = new ArrayDeque<>();
        mUploadQueue.add(new Pair<>(key, file));
    }
1172178
def submit(self, data, runtime_dir, argv):
        
        queue = 'ordinary'
        if data.process.scheduling_class == Process.SCHEDULING_CLASS_INTERACTIVE:
            queue = 'hipri'

        logger.debug(__(
            "Connector '{}' running for Data with id {} ({}) in celery queue {}, EAGER is {}.",
            self.__class__.__module__,
            data.id,
            repr(argv),
            queue,
            getattr(settings, 'CELERY_ALWAYS_EAGER', None)
        ))
        celery_run.apply_async((data.id, runtime_dir, argv), queue=queue)
620906
def submit(self, data, runtime_dir, argv):
        
        logger.debug(__(
            "Connector '{}' running for Data with id {} ({}).",
            self.__class__.__module__,
            data.id,
            repr(argv)
        ))
        subprocess.Popen(
            argv,
            cwd=runtime_dir,
            stdin=subprocess.DEVNULL
        ).wait()
1147585
def submit_job(self, job_definition, parameters, job_name=None, queue=None):
        """"""
        if job_name is None:
            job_name = _random_id()
        response = self._client.submit_job(
            jobName=job_name,
            jobQueue=queue or self.get_active_queue(),
            jobDefinition=job_definition,
            parameters=parameters
        )
        return response['jobId']