def compress_five_minute(): FiveMinuteShare.compress() FiveMinuteReject.compress() FiveMinuteTemperature.compress() FiveMinuteHashrate.compress() FiveMinuteType.compress() db.session.commit()
def compress_five_minute(self): try: FiveMinuteShare.compress() FiveMinuteReject.compress() db.session.commit() except Exception: logger.error("Unhandled exception in compress_five_minute", exc_info=True) db.session.rollback()