def check():
    logger.info("Get the alarm list need to send out.")
    alarms = dashboard_check_log.getAlarmSendList()

    alarmCount = len(alarms)
    logger.info("There are %d alarms totally." % (alarmCount))

    if alarms:
        mailSender = MailSender()
        for alarm in alarms:
            logger.info("---Begin to send alarm %s." % alarm)
            alarm.markSendAsStarted()

            logger.info(alarm % "---To send alarm %s.")
            mailSender.send(alarm)

            sendStatus = const.ALARM_SEND_STATUS_SUCCESSFUL
            alarm.markSendAsFinished(sendStatus)
            logger.info("---End to send alarm %s." % alarm)
    database_all.closeAllConnections()
dataset/ETHPy150Open harryliu/edwin/edwinServer/scripts/alarm_send.py/check/swapped operands of `%`