mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-07-13 14:43:05 +02:00
* Use correct postgres schema * Remove raw Session() use * Refactor + add test * Fix comment
12 lines
323 B
Python
12 lines
323 B
Python
QUERY_REPORT_NAME_PREFIX = "query-history"
|
|
|
|
|
|
def construct_query_history_report_name(
|
|
task_id: str,
|
|
) -> str:
|
|
return f"{QUERY_REPORT_NAME_PREFIX}-{task_id}.csv"
|
|
|
|
|
|
def extract_task_id_from_query_history_report_name(name: str) -> str:
|
|
return name.removeprefix(f"{QUERY_REPORT_NAME_PREFIX}-").removesuffix(".csv")
|