queueobj 14.0.2 → 14.0.4
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/app.js +10 -7
- package/package.json +1 -1
- package/test/package.js +1 -1
package/app.js
CHANGED
|
@@ -73,9 +73,9 @@ var log_object = class log_obj {
|
|
|
73
73
|
process(callback) {
|
|
74
74
|
let t = this
|
|
75
75
|
if (t.errors)
|
|
76
|
-
callback({ error: {msg: t.error_msg} })
|
|
76
|
+
callback({ error: { msg: t.error_msg } })
|
|
77
77
|
else {
|
|
78
|
-
callback({ success: {msg: `id = ${t.id} name(${t.name}) success`} })
|
|
78
|
+
callback({ success: { msg: `id = ${t.id} name(${t.name}) success` } })
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
}
|
|
@@ -114,7 +114,7 @@ exports = module.exports = class QueueObj {
|
|
|
114
114
|
t.resolve = resolve
|
|
115
115
|
t.reject = reject
|
|
116
116
|
})
|
|
117
|
-
t.promise_2q= new Promise((resolve, reject) => {
|
|
117
|
+
t.promise_2q = new Promise((resolve, reject) => {
|
|
118
118
|
t.resolve_2q = resolve
|
|
119
119
|
t.reject_2q = reject
|
|
120
120
|
})
|
|
@@ -127,7 +127,7 @@ exports = module.exports = class QueueObj {
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
process(props = {}) {
|
|
130
|
-
let t = this, fname = `app.process
|
|
130
|
+
let t = this, fname = `app.process`, xlog
|
|
131
131
|
|
|
132
132
|
// if (typeof props.data_to_process_array == 'undefined')
|
|
133
133
|
// t.reject('base_queue no props.data_to_process_array')
|
|
@@ -138,6 +138,9 @@ exports = module.exports = class QueueObj {
|
|
|
138
138
|
if (typeof props.process_objects == 'undefined')
|
|
139
139
|
t.reject(`props.process_objects not defined`)
|
|
140
140
|
|
|
141
|
+
xlog = {appender: "console"}
|
|
142
|
+
if (typeof props.xlog != "undefined" && typeof props.xlog.appender != "undefined")
|
|
143
|
+
xlog = props.xlog
|
|
141
144
|
try {
|
|
142
145
|
t.log_queue = new log_queue({
|
|
143
146
|
parent: t,
|
|
@@ -145,8 +148,8 @@ exports = module.exports = class QueueObj {
|
|
|
145
148
|
exclude_logMsg: props.exclude_logMsg,
|
|
146
149
|
resolve: t.resolve,
|
|
147
150
|
reject: t.reject
|
|
148
|
-
}).init(
|
|
149
|
-
t.base_queue = new base_queue({
|
|
151
|
+
}).init(xlog)
|
|
152
|
+
t.base_queue = new base_queue({
|
|
150
153
|
parent: t,
|
|
151
154
|
relative_path: "./appenders/",
|
|
152
155
|
logMsg: t.logMsg,
|
|
@@ -163,7 +166,7 @@ exports = module.exports = class QueueObj {
|
|
|
163
166
|
return this.qJson.get_class_obj_array()
|
|
164
167
|
}
|
|
165
168
|
|
|
166
|
-
logMsg(props = { msg: '', type: '' }) {
|
|
169
|
+
logMsg(props = { msg: '', type: '' }) {
|
|
167
170
|
let t = this, fname = "QueueObj.logMsg"
|
|
168
171
|
try {
|
|
169
172
|
if (typeof props.msg == "undefined")
|
package/package.json
CHANGED