Esempio n. 1
0
	def _go(self):

		self.log.info("Checking MT feeds for updates")
		fl = MtFeedLoader()
		fl.go()
		fl.closeDB()

		time.sleep(3)
		#print "wat", cl

		if not runStatus.run:
			return

		cl = MtContentLoader()

		if not runStatus.run:
			return

		todo = cl.retreiveTodoLinksFromDB()

		if not runStatus.run:
			return

		cl.processTodoLinks(todo)
		cl.closeDB()
Esempio n. 2
0
def test():

	signal.signal(signal.SIGINT, customHandler)

	# runner = Runner()
	# try:
	# 	runner.go()

	loader = MtFeedLoader()
	print("Running")

	loader.go()

	# try:
	# 	newItems = 0
	# 	for x in range(270, 3000):
	# 		print("Loop", x)

	# 		itemTemp = loader.getMainItems(rangeOverride=1, rangeOffset=x)

	# 		# for item in itemTemp:
	# 		# 	print("Item", item)

	# 		newItems += loader.processLinksIntoDB(itemTemp, isPicked=0)

	# 		loader.log.info("Loop %s, items %s", x, newItems)

	# 	loader.log.info( "Adding items to queue")


	# finally:
	# 	nt.dirNameProxy.stop()
	# # runner.checkFeed()
	# # print("Runniner = ", runner)

	# # getter = MtContentLoader()
	# # print(getter)

	cl = MtContentLoader()
	todo = cl.retreiveTodoLinksFromDB()

	if not runStatus.run:
		return

	cl.processTodoLinks(todo)
	cl.closeDB()