switched to sqlalchemy core for uptime calculation for performance improvement.