Run a specified crawler.
514498
def run(crawler):
    """"""
    crawler = get_crawler(crawler)
    crawler.run()
    if is_sync_mode():
        TaskRunner.run_sync()
1174569
def _run(self):
        """"""
        self.set_state(self.STATE_INITIALIZING)
        self.ioloop = ioloop.IOLoop.current()
        self.consumer_lock = locks.Lock()

        self.sentry_client = self.setup_sentry(
            self._kwargs['config'], self.consumer_name)

        try:
            self.setup()
        except (AttributeError, ImportError):
            return self.on_startup_error(
                'Failed to import the Python module for {}'.format(
                    self.consumer_name))

        if not self.is_stopped:
            try:
                self.ioloop.start()
            except KeyboardInterrupt:
                LOGGER.warning('CTRL-C while waiting for clean shutdown')
427130
def scheduled(wait=False):
    """"""
    manager.run_scheduled()
    while wait:
        # Loop and try to run scheduled crawlers at short intervals
        manager.run_scheduled()
        time.sleep(settings.SCHEDULER_INTERVAL)
526611
def run_process(*args, **kwargs):
    """"""
    warnings.warn(
        "procrunner.run_process() is deprecated and has been renamed to run()",
        DeprecationWarning,
        stacklevel=2,
    )
    return run(*args, **kwargs)
936536
def run(self):
        """"""
        executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
        loop = asyncio.get_event_loop()
        loop.run_until_complete(self._run_loop(executor))
        self._log.info('Shutting down...')
        executor.shutdown()
887020
def run(self):
        
        with self.input().open() as handle:
            body = json.loads(handle.read())
        es = elasticsearch.Elasticsearch()
        id = body.get('_id')
        es.index(index='frontpage', doc_type='html', id=id, body=body)
1374322
def runner(self, classpath, main, jvm_options=None, args=None, cwd=None):
    """"""
    return self._runner(*self._scrub_args(classpath, main, jvm_options, args, cwd=cwd))
1188363
def manage_crawler(self):
        
        index = True
        self.number_of_active_crawlers += 1
        while not self.shutdown and index is not None:
            index = self.crawler_list.get_next_item()
            if index is None:
                self.number_of_active_crawlers -= 1
                break

            self.start_crawler(index)
170703
def run(self):
        """"""
        try:
            while not self.stopped:
                scraperobj = jobs.get(False)
                self.setName(scraperobj.getName())
                try:
                    self.getStrips(scraperobj)
                finally:
                    jobs.task_done()
                    self.setName(self.origname)
        except Empty:
            pass
        except KeyboardInterrupt:
            thread.interrupt_main()
1266511
def run(config):
    ""
    app = make_app(config=config)

    app.run(
            host=app.config.get("HOST", '127.0.0.1'),
            port=app.config.get("PORT", 5000),
            use_reloader=True,
            )
1303987
private void performDelay() {
        try {
            TimeUnit.MILLISECONDS.sleep(crawlDelayMechanism.getDelay());
        } catch (InterruptedException ex) {
            Thread.currentThread().interrupt();
            isStopping = true;
        }
    }
277716
def run(self):
    """"""
    while not self._state.is_terminating:
      self._process_event_queue()
      self._state.maybe_pause()
990162
def run(self):
        """"""
        if len(self._argv) > 1 and len(self._argv[1]) > 0:
            oper = self._argv[1]
        else:
            oper = 'fetch'
        if oper == 'fetch':
            ret = self.fetch()
        elif oper == 'config':
            ret = self.config()
            if ret and self._dirtyConfig:
                ret = self.fetch()
        elif oper == 'autoconf':
            ret = self.autoconf()
            if ret:
                print "yes"
            else:
                print "no"
            ret = True
        elif oper == 'suggest':
            ret = self.suggest()
        else:
            raise AttributeError("Invalid command argument: %s" % oper)
        return ret
468149
public static void main(String[] args) {
		CrawljaxRunner crawljax =
		        new CrawljaxRunner(CrawljaxConfiguration.builderFor("http://demo.crawljax.com/")
		                .build());
		crawljax.call();
	}
902841
def run(self):
        
        self.collector.start()
        if self.standalone:
            self.collector.join()
849358
def schedule_next_request(self):
        
        req = self.next_request()

        if req:
            self.crawler.engine.crawl(req, spider=self)
402739
function bot (job, done) {
  debug('crawl job')
  debug(job.data)
  debug('Running : ' + job.data.title)
  var fetchURI = job.data.uri
  var media = job.data.media
  var output = job.data.output
  var redis = job.data.redis

  var interval = job.data.interval || defaultInterval
  debug('interval is', interval)

  run(media, fetchURI, output, done, client, redis, interval)
}