Beispiel #1
0
 def persist_job(self, hour, minute):
     print('persist job')
     query_minute = (hour * 60) + minute
     self.run_minute = query_minute
     DailyHeatedMattressJobDAO.delete_job(query_minute)
     db_session.add(self)
     print(db_session.query(DailyHeatedMattressJobDAO).count())
     print(db_session.query(DailyHeatedMattressJobDAO).all())
     for item in db_session.query(DailyHeatedMattressJobDAO).all():
         print(item)
 def persist_job(self, hour, minute):
     print('persist job')
     query_minute = (hour * 60) + minute
     self.run_minute = query_minute
     DailyHeatedMattressJobDAO.delete_job(query_minute)
     db_session.add(self)
     print(db_session.query(DailyHeatedMattressJobDAO).count())
     print(db_session.query(DailyHeatedMattressJobDAO).all())
     for item in db_session.query(DailyHeatedMattressJobDAO).all():
         print(item)
Beispiel #3
0
 def get_job(query_minute):
     return db_session.query(DailyHeatedMattressJobDAO).filter_by(
         run_minute=query_minute).first()
Beispiel #4
0
 def list_jobs():
     return db_session.query(DailyHeatedMattressJobDAO).order_by(
         "run_minute").all()
 def get_job(query_minute):
     return db_session.query(DailyHeatedMattressJobDAO).filter_by(
             run_minute=query_minute).first()
 def list_jobs():
     return db_session.query(DailyHeatedMattressJobDAO).order_by("run_minute").all()