Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Commit e6b5ce1

Browse files
authored
Merge pull request #10 from FlowzPlatform/develop
Develop
2 parents 01fb3ce + 41ebb63 commit e6b5ce1

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

uploader.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
let mongoose = require('mongoose')
22
const extend = require('util')._extend;
3-
mongoose.set('debug', true);
3+
mongoose.set('debug', false);
44
let ObjectId = require('mongoose').Types.ObjectId
55
const config = require('config')
66

@@ -67,7 +67,7 @@ let activeSummary = []
6767
let ESClient = new elasticsearch.Client({
6868
host: esUrl,
6969
requestTimeout: 100000
70-
// ,log: 'trace'
70+
// ,log: 'trace'
7171
})
7272
let uploadedRecord = 0
7373

@@ -93,6 +93,7 @@ let fileTypes =
9393

9494
let rethinkDbConnectionObj = null
9595
let doJob = async function (objWorkJob, next) {
96+
finalSKU = []
9697
rethinkDbConnectionObj = await connectRethinkDB(rethinkDBConnection)
9798
return new Promise(async (resolve, reject) => {
9899
console.log('==============In Do Job==============')
@@ -369,7 +370,7 @@ function getUserDataFromMongo(userid) {
369370
let userDataa = modelOBUsers.find({'_id': userid})
370371
return userDataa
371372
}
372-
373+
let finalSKU = []
373374
async function userDataPrepared (objWorkJob) {
374375
//console.log('ESuserData', ESuserData)
375376
// user data not set throws exception user not exists
@@ -412,7 +413,7 @@ async function userDataPrepared (objWorkJob) {
412413
}
413414
})
414415
}
415-
let finalSKU = []
416+
416417
async function getUpdateRecords (objWorkJob, currentProducts, futureProducts) {
417418
let uploadType = objWorkJob.data.uploadType
418419
let jobData = objWorkJob.data
@@ -1108,6 +1109,7 @@ async function deleteESData (versionNo, EsUser) {
11081109
]
11091110
}
11101111
},
1112+
"_source": ["sku","vid"],
11111113
"size":10000
11121114
}
11131115
await ESClient.search({

0 commit comments

Comments
 (0)