@tiledesk/tiledesk-server 2.9.15 → 2.9.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,9 @@
5
5
  🚀 IN PRODUCTION 🚀
6
6
  (https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
7
7
 
8
+ # 2.9.16
9
+ - Update: change automatically the content status on re-index
10
+
8
11
  # 2.9.15
9
12
  - Updated jobs-worker-queue-manager
10
13
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-server",
3
3
  "description": "The Tiledesk server module",
4
- "version": "2.9.15",
4
+ "version": "2.9.16",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
package/routes/kb.js CHANGED
@@ -1208,14 +1208,20 @@ async function startScrape(data) {
1208
1208
  data.gptkey = gptkey;
1209
1209
  }
1210
1210
 
1211
+
1212
+ let status_updated = await updateStatus(data.id, 200);
1213
+ winston.verbose("status of kb " + data.id + " updated: " + status_updated);
1214
+
1211
1215
  return new Promise((resolve, reject) => {
1212
1216
  openaiService.singleScrape(data).then(async (resp) => {
1213
1217
  winston.debug("singleScrape resp: ", resp.data);
1214
- let status_updated = await updateStatus(data.id, 100);
1218
+ let status_updated = await updateStatus(data.id, 300);
1215
1219
  winston.verbose("status of kb " + data.id + " updated: " + status_updated);
1216
1220
  resolve(resp.data);
1217
- }).catch((err) => {
1221
+ }).catch( async (err) => {
1218
1222
  winston.error("singleScrape err: ", err);
1223
+ let status_updated = await updateStatus(data.id, 400);
1224
+ winston.verbose("status of kb " + data.id + " updated: " + status_updated);
1219
1225
  reject(err);
1220
1226
  })
1221
1227
  })