Skip to content

Commit

Permalink
Move to Google MySQL
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-finley committed Mar 7, 2024
1 parent a41bd5b commit 3975c00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions oldest/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3975c00

Please sign in to comment.