querysub 0.421.0 → 0.423.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { lazy } from "socket-function/src/caching";
|
|
|
2
2
|
import { Archives, nestArchives } from "../../../-a-archives/archives";
|
|
3
3
|
import { deepCloneJSON, keyByArray, nextId, sort, timeInHour, timeInMinute, timeInSecond, timeoutToUndefinedSilent } from "socket-function/src/misc";
|
|
4
4
|
import { BufferIndex } from "./BufferIndex";
|
|
5
|
-
import { delay, runInParallel, runInSerial, runInfinitePoll } from "socket-function/src/batching";
|
|
5
|
+
import { delay, runInParallel, runInSerial, runInfinitePoll, runInfinitePollCallAtStart } from "socket-function/src/batching";
|
|
6
6
|
import { IndexedLogResults, Reader, SearchParams, addReadToResults, createEmptyIndexedLogResults, INDEX_EXTENSION, mergeIndexedLogResults } from "./BufferIndexHelpers";
|
|
7
7
|
import { getDomain, isPublic } from "../../../config";
|
|
8
8
|
import { getArchivesHome, getArchivesLocal } from "../../../-a-archives/archivesDisk";
|
|
@@ -127,7 +127,7 @@ export class IndexedLogs<T> {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
private runLogMoverLoop = lazy(() => {
|
|
130
|
-
|
|
130
|
+
void runInfinitePollCallAtStart(timeInMinute * 5, async () => {
|
|
131
131
|
await this.moveLogsToPublic();
|
|
132
132
|
});
|
|
133
133
|
});
|
|
@@ -147,7 +147,8 @@ export async function moveLogsToPublic(config: {
|
|
|
147
147
|
}));
|
|
148
148
|
if (buffers.length === 0) continue;
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
let totalSize = buffers.reduce((acc, x) => acc + x.buffer.length, 0);
|
|
151
|
+
console.log(magenta(`Merging and moving ${group.length} log files (${formatNumber(totalSize)}B) backblaze (${blue(config.loggerName)})`));
|
|
151
152
|
|
|
152
153
|
let allBuffers: Buffer[][] = [];
|
|
153
154
|
|