Fix import bug in server daemon

This commit is contained in:
Lance Edgar 2016-12-05 20:59:05 -06:00
parent 9a2fda3b68
commit fc7ec58303

View file

@ -31,7 +31,7 @@ import datetime
import logging
from rattail.db import Session, api
from rattail_tempmon import Session as TempmonSession
from rattail_tempmon.db import Session as TempmonSession, model as tempmon
from rattail.daemon import Daemon
from rattail.time import localtime, make_utc
from rattail.mail import send_email
@ -53,7 +53,9 @@ class TempmonServerDaemon(Daemon):
self.extra_emails = self.config.getlist('rattail.tempmon', 'extra_emails', default=[])
while True:
self.check_readings()
time.sleep(5)
# TODO: make this configurable
time.sleep(60)
def check_readings(self):
self.now = make_utc()