diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index aa38854..b431c36 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: uses: "google-github-actions/deploy-cloud-functions@v1" with: name: "projects/greg-finley/locations/us-central1/functions/check-oldest-living-person" - runtime: "python311" + runtime: "python312" entry_point: "main" source_dir: "oldest" memory_mb: 512 diff --git a/oldest/main.py b/oldest/main.py index 78fe06c..d4811bd 100644 --- a/oldest/main.py +++ b/oldest/main.py @@ -26,12 +26,10 @@ class KnownBirthdate: mysql_config = json.loads(os.environ["MYSQL_CONFIG"]) mysql_client = MySQLdb.connect( - host=mysql_config["MYSQL_HOST"], + unix_socket=mysql_config["MYSQL_SOCKET"], user=mysql_config["MYSQL_USERNAME"], passwd=mysql_config["MYSQL_PASSWORD"], db=mysql_config["MYSQL_DATABASE"], - ssl_mode="VERIFY_IDENTITY", - ssl={"ca": os.environ.get("SSL_CERT_FILE", "/etc/ssl/certs/ca-certificates.crt")}, ) mysql_client.autocommit(True)