Beispiel #1
0
def my_job():

    contentutil.printlog('..........start scan ga..........')

    ISOTIMEFORMAT = '%Y-%m-%d'
    start_date = datetime.datetime.now().strftime(ISOTIMEFORMAT)
    end_date = start_date
    start_date = '2019-09-10'
    end_date = '2019-09-10'
    result = Alldata()

    result.outputData(start_date, end_date)

    contentutil.printlog('..........finish scan ga..........')
Beispiel #2
0
	def outputNewsDb(self,newsRawdata,start_date):
	
		db = contentutil.MONGO_DBNAME
	
		collection = "GANewsLog"
		
		log_message = "===== Start Output NewsData to Mongo db : {} =====".format(db)
		contentutil.printlog(log_message)
	
		allDatalists = AllDatalists()
	
		allDatalists.rawdata = newsRawdata
	
		allDatalists.getNewsDatalists()
	
		allDatalists.send_datalists_to_mongo(db,collection)