update time usage
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import BatchingQueue from '../helpers/batchingQueue.js'
|
||||
import Queue from '../helpers/queue.js'
|
||||
import { CustomLogger, Item } from '../types/types.js'
|
||||
import { isSafari, TIME_MS } from '@speckle/shared'
|
||||
import { isSafari, TIME } from '@speckle/shared'
|
||||
import { BaseDatabaseOptions } from './options.js'
|
||||
import { Cache } from './interfaces.js'
|
||||
import { Dexie, DexieOptions, Table } from 'dexie'
|
||||
@@ -91,7 +91,7 @@ export default class IndexedDatabase implements Cache {
|
||||
this.#logger(
|
||||
'pausing reads (# in write queue: ' + this.#writeQueue?.count() + ')'
|
||||
)
|
||||
await new Promise((resolve) => setTimeout(resolve, TIME_MS.second)) // Pause for 1 second, protects against out of memory
|
||||
await new Promise((resolve) => setTimeout(resolve, TIME.second)) // Pause for 1 second, protects against out of memory
|
||||
continue
|
||||
}
|
||||
const batch = ids.slice(i, i + maxCacheReadSize)
|
||||
|
||||
@@ -2,7 +2,7 @@ import { describe, test, expect } from 'vitest'
|
||||
import { IDBFactory, IDBKeyRange } from 'fake-indexeddb'
|
||||
import ObjectLoader2 from '../operations/objectLoader2.js'
|
||||
import { Base } from '../types/types.js'
|
||||
import { TIME_MS } from '@speckle/shared'
|
||||
import { TIME } from '@speckle/shared'
|
||||
|
||||
describe('e2e', () => {
|
||||
test(
|
||||
@@ -36,6 +36,6 @@ describe('e2e', () => {
|
||||
expect(base2).toBeDefined()
|
||||
expect(base2.id).toBe('3841e3cbc45d52c47bc2f1b7b0ad4eb9')
|
||||
},
|
||||
10 * TIME_MS.second
|
||||
10 * TIME.second
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user