def _run()

in wadebug/wa_actions/implementations/check_mysql_version.py [0:0]


    def _run(cls, config, *args, **kwargs):
        try:
            mysql_utils = MySQLUtil(**config.get("db"))
            mysql_version = mysql_utils.get_mysql_version()
            if is_version_valid(mysql_version):
                return results.OK(cls)
            else:
                error_message = "Please make sure MySQL version is higher than 5.7.xx but NOT version 8. "
                "Refer to https://developers.facebook.com/docs/whatsapp/guides/installation for more details"
                return results.Problem(
                    cls,
                    "You are using an unsupported version of MySQL",
                    error_message,
                    "",
                )
        except Exception as e:
            return results.Problem(cls, "Unable to connect to db", e, "")