u
This commit is contained in:
@@ -47,9 +47,9 @@ const log = createLogger('import');
|
||||
* @param {number} opts.googleAuthId
|
||||
* @param {number} opts.companyId
|
||||
* @param {string} opts.importDir
|
||||
* @param {function} [opts.onProgress] - (counts) => void; throttled to 50ms
|
||||
* @param {function} [opts.onProgress] - (counts) => void; throttled to 250ms
|
||||
* @param {function} [opts.onImages] - (skelehashes: string[]) => void; batched every 50ms
|
||||
* @param {number} [opts.progressThrottleMs=50] - Progress emission throttle/debounce interval in ms
|
||||
* @param {number} [opts.progressThrottleMs=250] - Progress emission throttle/debounce interval in ms
|
||||
* @returns {Promise<object>} Summary outcome with statistics
|
||||
*/
|
||||
export async function executeCompanyImport({
|
||||
@@ -58,7 +58,7 @@ export async function executeCompanyImport({
|
||||
importDir,
|
||||
onProgress = () => {},
|
||||
onImages = () => {},
|
||||
progressThrottleMs = 50,
|
||||
progressThrottleMs = 250,
|
||||
}) {
|
||||
const store = await getStore();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ export function createProgressTracker({
|
||||
initialCounts,
|
||||
onProgress = () => {},
|
||||
onImages = () => {},
|
||||
progressThrottleMs = 50,
|
||||
progressThrottleMs = 250,
|
||||
imageBatchMs = 50,
|
||||
}) {
|
||||
const counts = {
|
||||
|
||||
Reference in New Issue
Block a user