Skip to content

Commit

Permalink
Updated variable name for local cache for exports
Browse files Browse the repository at this point in the history
  • Loading branch information
punith300i committed Jun 2, 2023
1 parent 28f804c commit 36ffa26
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions sand/controllers/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ class UpdateColumnLinksInput:
deser_update_column_links = get_dataclass_deserializer(UpdateColumnLinksInput, {})
assert deser_update_column_links is not None

GetAssistantCache = threading.local()
GetExportCache = threading.local()


def get_exports(name) -> IExport:
global GetAssistantCache
global GetExportCache

if not hasattr(GetAssistantCache, "exports"):
GetAssistantCache.exports = {}
if not hasattr(GetExportCache, "exports"):
GetExportCache.exports = {}
export_config = SETTINGS["exports"]
constructor = export_config[name]
GetAssistantCache.exports[name] = import_func(constructor)()
GetExportCache.exports[name] = import_func(constructor)()

return GetAssistantCache.exports[name]
return GetExportCache.exports[name]


@table_bp.route(f"/{table_bp.name}/<id>/export-models", methods=["GET"])
Expand Down

0 comments on commit 36ffa26

Please sign in to comment.