mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-27 06:24:56 +02:00
Handle compression of ai session logs
This commit is contained in:
@@ -11,7 +11,8 @@ import {
|
||||
queryAiSessionLogsQuery,
|
||||
queryAiSessionLogsParams,
|
||||
queryAiSession,
|
||||
countAiSessionQuery
|
||||
countAiSessionQuery,
|
||||
decompressAiSessionLogRow
|
||||
} from "./queryAiSessionLog";
|
||||
import { generateCSV } from "./generateCSV";
|
||||
|
||||
@@ -87,7 +88,9 @@ export async function exportAiSessionLogs(
|
||||
|
||||
const baseQuery = queryAiSession(data);
|
||||
|
||||
const log = await baseQuery.limit(MAX_EXPORT_LIMIT);
|
||||
const log = (await baseQuery.limit(MAX_EXPORT_LIMIT)).map(
|
||||
decompressAiSessionLogRow
|
||||
);
|
||||
|
||||
const csvData = generateCSV(log);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user