MCPcopy Index your code
hub / github.com/StackStorm/st2 / db_setup

Function db_setup

st2common/st2common/database_setup.py:51–58  ·  view source on GitHub ↗

Creates the database and indexes (optional).

(ensure_indexes=True)

Source from the content-addressed store, hash-verified

49
50
51def db_setup(ensure_indexes=True):
52 """
53 Creates the database and indexes (optional).
54 """
55 db_cfg = db_config()
56 db_cfg["ensure_indexes"] = ensure_indexes
57 connection = db_init.db_setup_with_retry(**db_cfg)
58 return connection
59
60
61def db_teardown():

Callers 15

setupFunction · 0.90
setupFunction · 0.90
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
_setup_dbFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
test_save_executionFunction · 0.50

Calls 1

db_configFunction · 0.85

Tested by 8

mainFunction · 0.40
test_save_executionFunction · 0.40
test_read_executionFunction · 0.40