chore: remove watcher polling option (#7480)

* remove watcher polling

* fix lint

* add db migration
This commit is contained in:
Jonathan Jogenfors 2024-02-28 21:20:10 +01:00 committed by GitHub
parent 784d92dbb3
commit e4f32a045d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 18 additions and 107 deletions

View file

@ -112,20 +112,13 @@ export class LibraryService extends EventEmitter {
ignore: library.exclusionPatterns,
});
const config = await this.configCore.getConfig();
const { usePolling, interval } = config.library.watch;
this.logger.debug(`Settings for watcher: usePolling: ${usePolling}, interval: ${interval}`);
let _resolve: () => void;
const ready$ = new Promise<void>((resolve) => (_resolve = resolve));
this.watchers[id] = this.storageRepository.watch(
library.importPaths,
{
usePolling,
interval,
binaryInterval: interval,
usePolling: false,
ignoreInitial: true,
},
{