Exemple #1
0
    def run(self, strCategoryId):
        """
		"""

        # 根据分类数计算协程数
        intCategoryLen = len(self.tupCategory)

        app.setPool(self, intCategoryLen)

        for i in range(0, intCategoryLen):
            self.pool.spawn(self.runSpawnLoadIndex, self.tupCategory[i], 0, 80)

        self.pool.join()
Exemple #2
0
	def run(self, strPool):
		'''
		@params strPool string 协程数
		'''

		# 队列key
		strQueueKeyName = self.dicConfig['QUEUE_KEYS']['SEARCH_LINK']

		intPool = int(strPool)
		app.setPool(self, intPool)

		for i in range(0, intPool):
			self.pool.spawn(self.runSpawnProd, strQueueKeyName)

		self.pool.join()
Exemple #3
0
	def run(self, strPool):
		'''
		@params strUrl string 商品链接地址
		'''

		# 队列key
		strQueueKeyName = self.dicConfig['QUEUE_KEYS']['ROUTINE']

		intPool = int(strPool)
		app.setPool(self, intPool)

		for i in range(0, intPool):
			self.pool.spawn(self.runSpawnProd, strQueueKeyName)

		self.pool.join()