def log_success(session,card_uid,req_type,door): r=db.Request_Success(card_uid=card_uid,req_type=req_type,door_name=door) session.add(r) session.commit() threading.Thread(target=lambda:send_status(session)).start() return True
#!/usr/bin/env python3 import config import app_status import database as db s = db.create_session(config.db) r = app_status.send_status(s, 'doorsbeat')
#!/usr/bin/env python3 import config import app_status import database as db s=db.create_session(config.db) r=app_status.send_status(s,'doorsbeat')