From eebd60af45bde6213c2fdcbd787e0d95bf89fbe2 Mon Sep 17 00:00:00 2001 From: geolffreym Date: Thu, 24 Mar 2022 12:58:40 -0600 Subject: [PATCH] doc: add method queue doc --- src/main/core/ingest.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/core/ingest.js b/src/main/core/ingest.js index 63139a009..f5b6e7968 100644 --- a/src/main/core/ingest.js +++ b/src/main/core/ingest.js @@ -14,11 +14,16 @@ module.exports = class Ingest extends EventEmitter { this.asyncLock = false } + + /** + * Add to queue hash to process + * @param {string} hash + */ set queue (hash) { log.info('Storing hash in queue') const cache = key.readFromStorage() const cacheList = cache.hash ?? [] - // Deduplication with sets + // Deduplicate with sets const newHash = [...new Set([...cacheList, ...[hash]])] key.addToStorage({ hash: newHash }) }