(db_connection_id)
| 97 | |
| 98 | @shared_task |
| 99 | def 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 |
no test coverage detected