Exemplo n.º 1
0
def run_processor(g=g):
    from pyspider.processor import Processor
    processor = Processor(projectdb=g.projectdb,
            inqueue=g.fetcher2processor, status_queue=g.status_queue,
            newtask_queue=g.newtask_queue, result_queue=g.processor2result)
    g.processor = processor
    processor.run()
Exemplo n.º 2
0
def run_processor(g=g):
    from pyspider.processor import Processor
    processor = Processor(projectdb=g.projectdb,
                          inqueue=g.fetcher2processor,
                          status_queue=g.status_queue,
                          newtask_queue=g.newtask_queue,
                          result_queue=g.processor2result)
    g.processor = processor
    processor.run()
Exemplo n.º 3
0
def processor(ctx):
    g = ctx.obj
    from pyspider.processor import Processor
    processor = Processor(projectdb=g.projectdb,
            inqueue=g.fetcher2processor, status_queue=g.status_queue,
            newtask_queue=g.newtask_queue, result_queue=g.processor2result)
    g.instances.append(processor)
    
    processor.run()
Exemplo n.º 4
0
def processor(ctx, Processor=Processor):
    g = ctx.obj
    processor = Processor(projectdb=g.projectdb,
                          inqueue=g.fetcher2processor, status_queue=g.status_queue,
                          newtask_queue=g.newtask_queue, result_queue=g.processor2result)

    g.instances.append(processor)
    if g.get('testing_mode'):
        return processor

    processor.run()