Example #1
0
def send_daily_data():
    jobdata = get_latest_data()
    store_job = Job_Data(store_type='redis')
    store_job.store(jobdata)
    result = data2html(jobdata,'job.tpl')
    mail = SendMail('Job')
    try:
        mail.send_email(msghtml=result)
    except:
        mail.send_email(msghtml=result)
Example #2
0
    def single_run(self,spiname):
        db = Job_Data(self.store_type)
        for data in self.get_single_data(spiname):
			db.store(data)