Exemplo n.º 1
0
def products_boss():
    results = tb_20130112_category_info.select().execute()
    for result in results:
        url = cat_base_url % result.cat_id
        products_queue.put(url)

    for x in xrange(20):
#        suppliers_group.spawn(products_worker)
        process = Process(target=products_worker)
        process.start()
Exemplo n.º 2
0
def products_boss():
    results = tb_20130112_category_info.select().execute()
    for result in results:
        url = cat_base_url % result.cat_id
        suppliers_queue.put(url)

    for x in xrange(20):
        suppliers_group.spawn(products_worker)

    suppliers_group.join()