Start the worker.
511794
public function run($verbose = false)
    {
        // Set up pheanstalk:
        $this->pheanstalk->watch($this->queue);
        $this->pheanstalk->ignore('default');

        while ($this->run) {
            $beanstalkJob = $this->pheanstalk->reserve(900);
            $jobData = json_decode($beanstalkJob->getData(), true);

            // Delete invalid jobs:
            if (empty($jobData) || !is_array($jobData) || empty($jobData['type'])) {
                $this->pheanstalk->delete($beanstalkJob);
                continue;
            }

            $job = new Job($jobData);

            // Delete jobs we don't have handlers for:
            if (!array_key_exists($job->getType(), $this->handlers)) {
                $this->pheanstalk->delete($beanstalkJob);
                Manager::update($job, Job::STATUS_FAILURE, 'No handler exists for this job type.');
                continue;
            }

            // Try and load the job handler:
            $handlerClass = $this->handlers[$job->getType()]['handler'];

            try {
                $handler = new $handlerClass($job, $this, $verbose);

                if (!($handler instanceof Handler)) {
                    throw new \Exception('Job handler does not extend \Octo\Job\Handler.');
                }

                Manager::update($job, Job::STATUS_RUNNING);

                // Try and run the job:
                $success = $handler->run();
            } catch (\Exception $ex) {
                $this->pheanstalk->delete($beanstalkJob);
                Manager::update($job, Job::STATUS_FAILURE, $ex->getMessage());
                continue;
            }

            Manager::update($job, ($success ? Job::STATUS_SUCCESS : Job::STATUS_FAILURE), $handler->getMessage());

            // Remove the job when we're done:
            $this->pheanstalk->delete($beanstalkJob);
        }
    }
241213
def start(self):
		
		if self._thread_running.is_set():
			raise RuntimeError('the JobManager has already been started')
		self._thread.start()
		self._thread_running.wait()
		return
488178
def start(self):
        
        component = Component(self.config, self.handlers)
        component.run()
356587
public void start() {
    	if(this.isActive)
    		return;
    	
        if (clock == null) {
            throw new IllegalStateException("Clock is not set");
        }

        this.isActive = true;
        
        logger.info("Starting ");
        
        coreThread.activate();
        criticalThread.activate();
        for(int i=0;i<workerThreads.length;i++)
        	workerThreads[i].activate();
        
        for(int i=0;i<criticalWorkerThreads.length;i++)
        	criticalWorkerThreads[i].activate();        
        
        logger.info("Started ");
    }
753041
def initialize_worker(self):
        """"""
        worker_thread = threading.Thread(
            name="WorkerThread", target=message_worker, args=(self,))
        worker_thread.setDaemon(True)
        worker_thread.start()
262633
protected function start()
    {
        $this->client->executeCommand(
            $this->client->createCommand('MONITOR')
        );
        $this->valid = true;
    }
343706
public function start()
    {
        $command = $this->client->createCommand('MONITOR');
        $this->client->executeCommand($command, $this);
    }
703480
def start(self):
        
        self.broker.emit_before("worker_boot", self)

        worker_middleware = _WorkerMiddleware(self)
        self.broker.add_middleware(worker_middleware)
        for _ in range(self.worker_threads):
            self._add_worker()

        self.broker.emit_after("worker_boot", self)
109186
async def start_worker(
        self,
        cmd: List[str],
        input_source: str,
        output: Optional[str] = None,
        extra_cmd: Optional[str] = None,
        pattern: Optional[str] = None,
        reading: str = FFMPEG_STDERR,
    ) -> None:
        """"""
        if self.is_running:
            _LOGGER.warning("Can't start worker. It is allready running!")
            return

        if reading == FFMPEG_STDERR:
            stdout = False
            stderr = True
        else:
            stdout = True
            stderr = False

        # start ffmpeg and reading to queue
        await self.open(
            cmd=cmd,
            input_source=input_source,
            output=output,
            extra_cmd=extra_cmd,
            stdout_pipe=stdout,
            stderr_pipe=stderr,
        )

        self._input = await self.get_reader(reading)

        # start background processing
        self._read_task = self._loop.create_task(self._process_lines(pattern))
        self._loop.create_task(self._worker_process())
1159248
def start(self):
        """"""
        self.run_task = self.pyvlx.loop.create_task(
            self.loop())
432060
def start(self):
        """"""
        self.loop.create_task(self._read_line())
        self.loop.create_task(self._greeting())
302433
def start(self):
        """"""
        assert self._thread is None, 'thread already started'

        # configure thread
        self._thread = Thread(target=self._start_io_loop)
        self._thread.daemon = True

        # begin thread and block until ready
        self._thread.start()
        self._ready.wait()
346982
def start(self, block=True):
        """"""
        if self._state == INIT:
            if not any(self.on_message.receivers_for(blinker.ANY)):
                raise RuntimeError('no receivers connected to on_message')

            self.logger.debug('starting %s...', self.name)
            self._state = RUNNING
            self.query_nsqd()

            if self.lookupds:
                self.query_lookupd()
                self._killables.add(self._workers.spawn(self._poll_lookupd))

            self._killables.add(self._workers.spawn(self._poll_ready))

        else:
            self.logger.warn('%s already started', self.name)

        if block:
            self.join()
639981
def start_worker(self):
        """"""
        if not self.include_rq:
            return None

        worker = Worker(queues=self.queues,
                        connection=self.connection)
        worker_pid_path = current_app.config.get(
            "{}_WORKER_PID".format(self.config_prefix), 'rl_worker.pid'
        )

        try:
            worker_pid_file = open(worker_pid_path, 'r')
            worker_pid = int(worker_pid_file.read())
            print("Worker already started with PID=%d" % worker_pid)
            worker_pid_file.close()

            return worker_pid

        except (IOError, TypeError):
            self.worker_process = Process(target=worker_wrapper, kwargs={
                'worker_instance': worker,
                'pid_path': worker_pid_path
            })
            self.worker_process.start()
            worker_pid_file = open(worker_pid_path, 'w')
            worker_pid_file.write("%d" % self.worker_process.pid)
            worker_pid_file.close()

            print("Start a worker process with PID=%d" %
                  self.worker_process.pid)

            return self.worker_process.pid
308392
public void start() {
    	synchronized(worker) {
    		//check scheduler
    		try {
    			//prevent duplicate starting
    			if (started) {
    				return;
    			}

    			if (scheduler == null) {
    				throw new IllegalArgumentException("Scheduler is not assigned");
    			}

    			this.txBytes = 0;
    			this.txPackets = 0;
            
    			//reset media time and sequence number
    			timestamp = this.initialOffset;
    			this.initialOffset = 0;
            
    			sn = 0;

    			//switch indicator that source has been started
    			started = true;

    			//just started component always synchronized as well
    			this.isSynchronized = true;
    			
    			if(mediaSink!=null)
    				mediaSink.start();
    			
    			//scheduler worker    
    			worker.reinit();
    			scheduler.submit(worker,worker.getQueueNumber());
    			
    			//started!
    			started();
    		} catch (Exception e) {
    			started = false;
    			failed(e);
    			logger.error(e);
    		}
    	}
    }
1147473
def start(self):
        

        # Spawn the listening thread
        self.listen_thread = eventlet.spawn_n(self.listen)

        # Now do the initial load
        self.reload()
1236666
def _start(self, worker=None):
        """"""
        if worker:
            self._queue_workers.append(worker)

        if self._queue_workers and self._running_threads < self._max_threads:
            #print('Queue: {0} Running: {1} Workers: {2} '
            #       'Threads: {3}'.format(len(self._queue_workers),
            #                                 self._running_threads,
            #                                 len(self._workers),
            #                                 len(self._threads)))
            self._running_threads += 1
            worker = self._queue_workers.popleft()
            thread = QThread()
            if isinstance(worker, PythonWorker):
                worker.moveToThread(thread)
                worker.sig_finished.connect(thread.quit)
                thread.started.connect(worker._start)
                thread.start()
            elif isinstance(worker, ProcessWorker):
                thread.quit()
                worker._start()
            self._threads.append(thread)
        else:
            self._timer.start()

        if self._workers:
            for w in self._workers:
                if w.is_finished():
                    self._bag_collector.append(w)
                    self._workers.remove(w)

        if self._threads:
            for t in self._threads:
                if t.isFinished():
                    self._threads.remove(t)
                    self._running_threads -= 1

        if len(self._threads) == 0 and len(self._workers) == 0:
            self._timer.stop()
            self._timer_worker_delete.start()