コード例 #1
0
def main2(i, q):
    while True:
        filename, brandname, catname, l = q.get()
        logging.debug((filename, brandname, catname, l))
        code6_allinone2.main(filename, brandname, catname, l)
        time.sleep(2)
        q.task_done()
コード例 #2
0
def main():
    f = open("availdirthree")
    dirthree = f.read().strip()
    f.close()
      
    #output = subprocess.check_output(["find", dirthree,  "-name",  "*.csv"])
    output = subprocess.check_output(["find", dirthree,  "-name",  "*.csv"])
    pth_list = output.strip().split("\n")

    val = len(pth_list)/5
    val1 = val*3
    val2 = val*4

    pth_list = pth_list[val1:val2]

    #for i in range(mp_num_fetch_threads):
    #    worker = multiprocessing.Process(target=main2, args=(i, mp_enclosure_queue,))
	#worker.setDaemon(True)
    #	worker.start()

    #for pth in pth_list:
    #     mp_enclosure_queue.put(pth)
         
    for pth in pth_list:
        code6_allinone2.main(pth)
コード例 #3
0
def main2(i, q):
    while True:
        filename, brandname, catname, l = q.get()
        logging.debug((filename, brandname, catname, l))
        code6_allinone2.main(filename, brandname, catname, l)
        time.sleep(2)
        q.task_done()
コード例 #4
0
mp_num_fetch_threads = 5
mp_enclosure_queue = multiprocessing.Queue()
>>>>>>> a0099e0a269d70bd87a7493005e633efedffbbb1



logging.basicConfig(level=logging.DEBUG,
                    format='[%(levelname)s] (%(threadName)-10s) %(message)s',
		                        )

def main2(i, q):
    while True:
        pth = q.get()
	logging.debug(pth)
<<<<<<< HEAD
        code6_allinone2.main(pth)
=======
        code6_allinone.main(pth)
>>>>>>> a0099e0a269d70bd87a7493005e633efedffbbb1
        time.sleep(2)
        #q.task_done()
    
    

def main():
<<<<<<< HEAD
    #f = open("availdirthree")
    #dirthree = f.read().strip()
    #f.close()

    dirthree = "dirthree08022014"