We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 12d556c commit 21476c5Copy full SHA for 21476c5
fastapi_gcp_tasks/utils.py
@@ -46,7 +46,8 @@ def ensure_queue(
46
47
def emulator_client() -> tasks_v2.CloudTasksClient:
48
"""Helper function to create a CloudTasksClient from an emulator host."""
49
- host = os.getenv("CLOUD_TASKS_EMULATOR_HOST", "localhost:8124")
50
- channel = grpc.insecure_channel(host)
+ host = os.getenv("CLOUD_TASKS_EMULATOR_HOST", "localhost")
+ port = os.getenv("CLOUD_TASKS_EMULATOR_PORT", "8123")
51
+ channel = grpc.insecure_channel(f"{host}:{port}")
52
transport = transports.CloudTasksGrpcTransport(channel=channel)
53
return tasks_v2.CloudTasksClient(transport=transport)
0 commit comments