Added sqlite batch command runner to view database, fixed recdata object writing

This commit is contained in:
MrFry 2020-04-08 16:50:14 +02:00
parent bcf377ad56
commit 03c54c7bd4
3 changed files with 37 additions and 2 deletions

View file

@ -48,7 +48,11 @@ function ProcessIncomingRequest (recievedData, qdb, infos) {
try {
let towrite = logger.GetDateString() + '\n'
towrite += '------------------------------------------------------------------------------\n'
towrite += recievedData
if (typeof recievedData === 'object') {
towrite += JSON.stringify(recievedData)
} else {
towrite += recievedData
}
towrite += '\n------------------------------------------------------------------------------\n'
utils.AppendToFile(towrite, recDataFile)
logger.DebugLog('recDataFile written', 'actions', 1)
@ -93,7 +97,7 @@ function ProcessIncomingRequest (recievedData, qdb, infos) {
let color = logger.GetColor('green')
let msg = ''
if (allQuestions.length > 0) {
color = logger.GetColor('cyan')
color = logger.GetColor('blue')
msg += `New questions: ${allQuestions.length} ( All: ${allQLength} )`
allQuestions.forEach((q) => {
const sName = classes.SUtils.GetSubjNameWithoutYear(d.subj)