def monitor_download_pulses_ha(): """Monitor for new pulses (HA Environments) Returns: True if successful, False otherwise """ rt = False ha_enabled = False try: is_otx_enabled = apimethod_is_otx_enabled() if is_otx_enabled is True: system_id = get_system_id_from_local()[1] success, system_info = system_status(system_id) if success is False: APICannotRetrieveSystems() if 'ha_status' in system_info and system_info['ha_status'] == 'up': logger.info("Monitor MonitorDownloadPulses [HA] started") ha_enabled = True monitor = MonitorDownloadPulses() rt = monitor.start() except: rt = False if ha_enabled is True: logger.info("Monitor MonitorDownloadPulses [HA] stopped") return rt
def monitor_download_pulses(): """Monitor for new pulses Returns: True if successful, False otherwise """ logger.info("Monitor MonitorDownloadPulses started") monitor = MonitorDownloadPulses() try: rt = monitor.start() except: rt = False logger.info("Monitor MonitorDownloadPulses stopped") return rt