mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
eslint fix
This commit is contained in:
parent
43831cba94
commit
4f0236b3ff
@ -21,6 +21,7 @@ class Search {
|
|||||||
|
|
||||||
constructor(userId) {
|
constructor(userId) {
|
||||||
this.isInitialized = false;
|
this.isInitialized = false;
|
||||||
|
this.messageData = [];
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
this.startIndexingFromDate = (new Date().getTime() - SEARCH_PERIOD_SUBTRACTOR).toString();
|
this.startIndexingFromDate = (new Date().getTime() - SEARCH_PERIOD_SUBTRACTOR).toString();
|
||||||
this.indexFolderName = INDEX_PREFIX + '_' + userId + '_' + INDEX_VERSION;
|
this.indexFolderName = INDEX_PREFIX + '_' + userId + '_' + INDEX_VERSION;
|
||||||
@ -28,7 +29,7 @@ class Search {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initLib() {
|
initLib() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve) => {
|
||||||
if (!this.isInitialized) {
|
if (!this.isInitialized) {
|
||||||
this.isInitialized = true;
|
this.isInitialized = true;
|
||||||
}
|
}
|
||||||
@ -68,7 +69,7 @@ class Search {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mergeIndexBatches() {
|
mergeIndexBatches() {
|
||||||
libSymphonySearch.symSEMergePartialIndexAsync(this.indexFolderName, TEMP_BATCH_INDEX_FOLDER, function (err, res) {
|
libSymphonySearch.symSEMergePartialIndexAsync(this.indexFolderName, TEMP_BATCH_INDEX_FOLDER, function (err) {
|
||||||
if (err) throw err;
|
if (err) throw err;
|
||||||
|
|
||||||
libSymphonySearch.symSERemoveFolder(TEMP_BATCH_INDEX_FOLDER);
|
libSymphonySearch.symSERemoveFolder(TEMP_BATCH_INDEX_FOLDER);
|
||||||
@ -78,12 +79,12 @@ class Search {
|
|||||||
readJson() {
|
readJson() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
var files = fs.readdirSync('./msgsjson');
|
var files = fs.readdirSync('./msgsjson');
|
||||||
let messageData = [];
|
this.messageData = [];
|
||||||
files.forEach(function (file) {
|
files.forEach(function (file) {
|
||||||
let data = fs.readFileSync('./msgsjson/' + file, "utf8");
|
let data = fs.readFileSync('./msgsjson/' + file, "utf8");
|
||||||
if (data) {
|
if (data) {
|
||||||
messageData.push(JSON.parse(data));
|
this.messageData.push(JSON.parse(data));
|
||||||
resolve(messageData);
|
resolve(this.messageData);
|
||||||
} else {
|
} else {
|
||||||
reject("err on reading files")
|
reject("err on reading files")
|
||||||
}
|
}
|
||||||
@ -116,7 +117,7 @@ class Search {
|
|||||||
if (!isNaN(endDate)) {
|
if (!isNaN(endDate)) {
|
||||||
ed_str = endDate.toString();
|
ed_str = endDate.toString();
|
||||||
}
|
}
|
||||||
|
/*eslint-disable no-param-reassign */
|
||||||
if (isNaN(limit)) {
|
if (isNaN(limit)) {
|
||||||
limit = 25;
|
limit = 25;
|
||||||
}
|
}
|
||||||
@ -135,11 +136,7 @@ class Search {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*freeResults(res) {
|
static constructQuery(query) {
|
||||||
libSymphonySearch.symSEFreeResult(ret);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
static constructQuery(query, senderIds, threadIds, attachments) {
|
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user