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