Skip to content

Commit

Permalink
Add cache over gcp_get_secret_value (#616)
Browse files Browse the repository at this point in the history
  • Loading branch information
kongzii authored Feb 17, 2025
1 parent e2e6ca1 commit 3149992
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions prediction_market_agent_tooling/deploy/gcp/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import subprocess
import sys
from functools import cache

from google.cloud.functions_v2.services.function_service.client import (
FunctionServiceClient,
Expand Down Expand Up @@ -197,6 +198,7 @@ def gcp_function_is_active(fname: str) -> bool:
return get_gcp_function(fname).state == Function.State.ACTIVE


@cache
def gcp_get_secret_value(name: str, version: str = "latest") -> str:
client = SecretManagerServiceClient()
return client.access_secret_version(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "prediction-market-agent-tooling"
version = "0.58.0"
version = "0.58.1"
description = "Tools to benchmark, deploy and monitor prediction market agents."
authors = ["Gnosis"]
readme = "README.md"
Expand Down

0 comments on commit 3149992

Please sign in to comment.