@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 +3 -0
- package/package.json +1 -1
- package/routes/kb.js +8 -2
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
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,
|
|
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
|
})
|