MCPcopy Create free account
hub / github.com/explorerhq/sql-explorer / build_schema_cache_async

Function build_schema_cache_async

explorer/tasks.py:99–110  ·  view source on GitHub ↗
(db_connection_id)

Source from the content-addressed store, hash-verified

97
98@shared_task
99def build_schema_cache_async(db_connection_id):
100 from .schema import (
101 build_schema_info,
102 connection_schema_cache_key,
103 connection_schema_json_cache_key,
104 transform_to_json_schema,
105 )
106 db_connection = DatabaseConnection.objects.get(id=db_connection_id)
107 ret = build_schema_info(db_connection)
108 cache.set(connection_schema_cache_key(db_connection.id), ret)
109 cache.set(connection_schema_json_cache_key(db_connection.id), transform_to_json_schema(ret))
110 return ret
111
112
113@shared_task

Callers 1

schema_infoFunction · 0.90

Calls 5

build_schema_infoFunction · 0.85
transform_to_json_schemaFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected