def compress_minute():
    """ Compresses OneMinute records (for temp, hashrate, shares, rejects) to
    FiveMinute """
    OneMinuteShare.compress()
    OneMinuteReject.compress()
    OneMinuteTemperature.compress()
    OneMinuteHashrate.compress()
    OneMinuteType.compress()
    db.session.commit()
示例#2
0
def compress_minute():
    """ Compresses OneMinute records (for temp, hashrate, shares, rejects) to
    FiveMinute """
    OneMinuteShare.compress()
    OneMinuteReject.compress()
    OneMinuteTemperature.compress()
    OneMinuteHashrate.compress()
    OneMinuteType.compress()
    db.session.commit()
示例#3
0
def compress_minute(self):
    """ Compresses OneMinute records (for temp, hashrate, shares, rejects) to
    FiveMinute """
    try:
        OneMinuteShare.compress()
        OneMinuteReject.compress()
        OneMinuteTemperature.compress()
        db.session.commit()
    except Exception:
        logger.error("Unhandled exception in compress_minute", exc_info=True)
        db.session.rollback()