|
|
@ -343,7 +343,7 @@ class Datastore extends EventEmitter { |
|
|
|
setAutocompactionInterval (interval) { |
|
|
|
setAutocompactionInterval (interval) { |
|
|
|
const minInterval = 5000 |
|
|
|
const minInterval = 5000 |
|
|
|
if (Number.isNaN(Number(interval))) throw new Error('Interval must be a non-NaN number') |
|
|
|
if (Number.isNaN(Number(interval))) throw new Error('Interval must be a non-NaN number') |
|
|
|
const realInterval = Math.max(Number(interval) || 0, minInterval) |
|
|
|
const realInterval = Math.max(Number(interval), minInterval) |
|
|
|
|
|
|
|
|
|
|
|
this.stopAutocompaction() |
|
|
|
this.stopAutocompaction() |
|
|
|
|
|
|
|
|
|
|
|