def poll_integration_alert_data(integration_alert):
    """Poll for updates on waiting IntegrationAlerts."""
    logger.info("Polling information for integration alert %s", integration_alert)
    try:
        configured_integration = integration_alert.configured_integration
        integration_actions_instance = configured_integration.integration.module

        output_data, output_file_content = integration_actions_instance.poll_for_updates(
            json.loads(integration_alert.output_data)
        )

        integration_alert.status = IntegrationAlertStatuses.DONE.name
        integration_alert.output_data = json.dumps(output_data)
        polling_integration_alerts.remove(integration_alert)

    except exceptions.IntegrationNoMethodImplementationError:
        logger.error("No poll_for_updates function found for integration alert %s", integration_alert)

        integration_alert.status = IntegrationAlertStatuses.ERROR_POLLING.name

    except exceptions.IntegrationPollEventError:
        # This does not always indicate an error, this is also raised when need to try again later
        logger.debug("Polling for integration alert %s failed", integration_alert)

    except exceptions.IntegrationOutputFormatError:
        logger.error("Integration alert %s formatting error", integration_alert)

        integration_alert.status = IntegrationAlertStatuses.ERROR_POLLING_FORMATTING.name

    except Exception:
        logger.exception("Error polling integration alert %s", integration_alert)

        integration_alert.status = IntegrationAlertStatuses.ERROR_POLLING.name
Poll for updates on waiting IntegrationAlerts.