We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3bd813 commit ab1ee0bCopy full SHA for ab1ee0b
1 file changed
examples/cloud-function-trivial-example/index.py
@@ -1,8 +1,14 @@
1
import os
2
import ydb
3
4
+
5
+driver_config = ydb.DriverConfig(
6
+ endpoint=os.getenv("YDB_ENDPOINT"),
7
+ database=os.getenv("YDB_DATABASE"),
8
+ disable_discovery=True, # it is recommended to disable discovery for cloud functions
9
+)
10
# create driver in global space.
-driver = ydb.Driver(endpoint=os.getenv("YDB_ENDPOINT"), database=os.getenv("YDB_DATABASE"))
11
+driver = ydb.Driver(driver_config)
12
# Wait for the driver to become active for requests.
13
driver.wait(fail_fast=True, timeout=5)
14
# Create the session pool instance to manage YDB sessions.
0 commit comments