queueobj 12.0.18 → 14.0.0

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.
Files changed (54) hide show
  1. package/.github/workflows/node.js.yml +1 -4
  2. package/README.md +101 -73
  3. package/app.js +143 -232
  4. package/lib/appenders/all.js +1 -1
  5. package/lib/appenders/base.js +3 -4
  6. package/lib/appenders/bottom_one.js +1 -1
  7. package/lib/appenders/func_all.js +1 -1
  8. package/lib/appenders/sync.js +1 -1
  9. package/lib/appenders/sync_all.js +1 -1
  10. package/lib/appenders/top_one.js +1 -1
  11. package/lib/appenders/version.js +1 -1
  12. package/package.json +33 -15
  13. package/test/app.js +15 -51
  14. package/test/package.js +33 -15
  15. package/tests/all.js +85 -0
  16. package/tests/appenders/all.js +17 -0
  17. package/tests/appenders/base.js +189 -0
  18. package/tests/appenders/bottom_one.js +17 -0
  19. package/tests/appenders/func_all.js +17 -0
  20. package/tests/appenders/name.js +17 -0
  21. package/tests/appenders/status.js +17 -0
  22. package/tests/appenders/sync.js +17 -0
  23. package/tests/appenders/sync_all.js +17 -0
  24. package/tests/appenders/top_one.js +17 -0
  25. package/tests/appenders/version.js +17 -0
  26. package/tests/bottom_one.js +86 -0
  27. package/tests/files.js +108 -0
  28. package/tests/func_all.js +94 -0
  29. package/tests/json_all.js +107 -0
  30. package/tests/json_bottom_one.js +108 -0
  31. package/tests/json_func_all.js +109 -0
  32. package/tests/json_name_matching.js +109 -0
  33. package/tests/json_name_non_matching.js +109 -0
  34. package/tests/json_status_matching.js +110 -0
  35. package/tests/json_status_non_matching.js +110 -0
  36. package/tests/json_top_one.js +108 -0
  37. package/tests/json_version_matching.js +110 -0
  38. package/tests/json_version_non_matching.js +110 -0
  39. package/tests/name_matching.js +90 -0
  40. package/tests/name_non_matching.js +90 -0
  41. package/tests/status_matching.js +90 -0
  42. package/tests/status_non_matching.js +90 -0
  43. package/tests/top_one.js +85 -0
  44. package/tests/version_matching.js +90 -0
  45. package/tests/version_non_matching.js +90 -0
  46. package/test/base.js +0 -22
  47. package/tests/test_all.js +0 -36
  48. package/tests/test_bottom_one.js +0 -28
  49. package/tests/test_func_all.js +0 -43
  50. package/tests/test_name.js +0 -86
  51. package/tests/test_status.js +0 -86
  52. package/tests/test_sync_all.js +0 -79
  53. package/tests/test_top_one.js +0 -29
  54. package/tests/test_version.js +0 -97
@@ -78,8 +78,5 @@ jobs:
78
78
  run: npm ls --depth=0 --dev && npm ls --depth=0 --prod
79
79
 
80
80
  - run: npm run build --if-present
81
+ - run: npm run test_files
81
82
  - run: npm run test_all
82
- - run: npm run test_bottom_one
83
- - run: npm run test_top_one
84
- - run: npm run test_func_all
85
- - run: npm run test_sync_all
package/README.md CHANGED
@@ -5,18 +5,26 @@
5
5
 
6
6
  [![NPM](https://nodei.co/npm/queueobj.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/queueobj/)
7
7
 
8
- Queue javascript objects dynamically then process the queue according to the appender.
8
+ Queue javascript objects dynamically then process the queue according to the appender. All appenders are handled synchronously.
9
9
 
10
10
  Included tag appenders:
11
11
 
12
- * all - synchronous - process all added objects.
13
- * func_all - synchronous - process custom functions to added objects.
14
- * top_one - synchronous - process only the object in the 0(zero) position of the process array.
15
- * bottom_one - synchronous - process only the object in the last position of the process array.
16
- * sync_all - synchronous - All appenders are synchronous now. Sync_all is no different than all.
17
- * status - synchronous - queue and process all objects by status.
18
- * name - synchronous - queue and process all objects by name.
19
- * version - synchronous - queue and process all objects by version.
12
+ * files - See if inputed files exists.
13
+ * all - process all added objects.
14
+ * top_one - process only the object in the 0(zero) position of the process array.
15
+ * bottom_one - process only the object in the last position of the process array.
16
+ * func_all - process custom function names in created objects. Custom processing names can be used in any appender, this is just one example.
17
+ * status - queue and process all objects by status.
18
+ * name - queue and process all objects by name.
19
+ * version - queue and process all objects by version.
20
+
21
+ * json_all - process a class object per json input array variables.
22
+ * json_top_one - process a class object per the first json input array variable.
23
+ * json_bottom_one - process a class object per the last json input array variable.
24
+ * json_func_all - process custom function names in created objects. Custom processing names can be used in any json appender, this is just one example.
25
+ * json_status - queue and process all objects by status.
26
+ * json_name - queue and process all objects by name.
27
+ * json_version - queue and process all objects by version.
20
28
 
21
29
  Mocha Test
22
30
  ---------
@@ -27,14 +35,27 @@ npm test
27
35
  General Setup Test
28
36
  ---------
29
37
  ```
38
+ npm run test_files
30
39
  npm run test_all
31
40
  npm run test_top_one
32
41
  npm run test_bottom_one
33
42
  npm run test_func_all
34
- npm run test_sync_all
35
- npm run test_status
36
- npm run test_version
37
- npm run test_name
43
+ npm run test_status_matching
44
+ npm run test_status_non_matching
45
+ npm run test_name_matching
46
+ npm run test_name_non_matching
47
+ npm run test_version_matching
48
+ npm run test_version_non_matching
49
+ npm run test_json_all
50
+ npm run test_json_top_one
51
+ npm run test_json_bottom_one
52
+ npm run test_json_func_all
53
+ npm run test_json_status_matching
54
+ npm run test_json_status_non_matching
55
+ npm run test_json_version_matching
56
+ npm run test_json_version_non_matching
57
+ npm run test_json_name_matching
58
+ npm run test_json_name_non_matching
38
59
 
39
60
  ```
40
61
 
@@ -42,76 +63,83 @@ Usage
42
63
  ---------
43
64
  ```js
44
65
 
45
- var colors = require('colors')
46
66
  var queue = require("queueobj");
47
67
 
48
- class test1 {
49
- constructor() {
50
- this.id = 100
51
- this.process = this.process.bind(this)
52
- }
53
-
54
- process(callback) {
55
- setTimeout(() => {
56
- console.log(`processing test1`.cyan)
57
- console.log(`some async process`)
58
- callback({success: {msg: `processing all (${this.id})`}})
59
- }, 3000)
60
- }
68
+ var tst1 = class test1 {
69
+ constructor(props) {
70
+ let t = this, fname = "test_all.test1.constructor"
71
+ t.log = props.log
72
+ t.id = props.id
73
+ }
74
+
75
+ process(callback) {
76
+ let t = this, fname = "test_all.test1.process"
77
+ t.log({ msg: `This object (${fname}) is id (${t.id}). Do stuff here`.bgBrightGreen, type: "info" })
78
+ callback({ success: { msg: `processing all test1` } })
79
+ }
61
80
  }
62
81
 
63
- class test2 {
64
- constructor() {
65
- this.id = 200
66
- this.process = this.process.bind(this)
67
- }
68
-
69
- process(callback) {
70
- let msg = `some kinda problem here in id(${this.id})`
71
- // callback({error: {msg: msg}}) //this will show errors
72
- callback({success: {msg: `processing all (${this.id})}`}}) //this will show no errors
73
- }
74
-
75
- ping() {
76
- console.log('hello from test2'.rainbow)
77
- }
82
+ var tst2 = class test2 {
83
+ constructor(props) {
84
+ let t = this, fname = "test_all.test2.constructor"
85
+ t.log = props.log
86
+ t.id = props.id
87
+ }
88
+
89
+ process(callback) {
90
+ let t = this, fname = "test_all.test2.process"
91
+ t.log({ msg: `This object (${fname}) is id (${t.id}). Do stuff here`.bgBrightGreen, type: "info" })
92
+ setTimeout(() => {
93
+ callback({ success: { msg: `processing all test2` } })
94
+ }, 4000)
95
+ }
78
96
  }
79
97
 
80
- class test3 {
81
- constructor() {
82
- this.id = 300
83
- this.process = this.process.bind(this)
84
- }
85
-
86
- process(callback) {
87
- callback({success: {msg: `processing all (${this.id})}`}})
88
- }
98
+ var tst3 = class test3 {
99
+ constructor(props) {
100
+ let t = this, fname = "test_all.test3.constructor"
101
+ t.log = props.log
102
+ t.id = props.id
103
+ }
104
+
105
+ process(callback) {
106
+ let t = this, fname = "test_all.test3.process"
107
+ t.log({ msg: `This object (${fname}) is id (${t.id}). Do stuff here`.bgBrightGreen, type: "info" })
108
+ // callback({success: { msg: `processing all test3` }})
109
+ callback({ error: { msg: `there is some problem thrown here on test3` } })
110
+ }
89
111
  }
90
112
 
91
- class test4 {
92
- constructor() {
93
- let t = this
94
- t.id = 400
95
- t.custom_function = t.custom_function.bind(this)
96
- }
97
-
98
- custom_function(callback) {
99
- let msg = `custom func problem here id(${this.id})`
100
- setTimeout(() => {
101
- // callback({error: {msg: msg}}) //this will show errors
102
- callback({success: {msg: `processing all (${this.id})}`}}) //this will show no errors
103
- }, 3000)
104
- }
105
- }
106
- let tst4 = new test4()
107
- let qObj = new queue(), props = { appender: 'name' }
113
+ var tst4 = class test4 {
114
+ constructor(props) {
115
+ let t = this, fname = "test_all.test4.constructor"
116
+ t.log = props.log
117
+ t.id = props.id
108
118
 
109
- qObj.load(props).add(new test1()).add(new test2()).add(new test3()).add(tst4.custom_function)
119
+ }
120
+
121
+ process(callback) {
122
+ let t = this, fname = "test_all.test4.process"
123
+ t.log({ msg: `This object (${fname}) is id (${t.id}). Do stuff here`.bgBrightGreen, type: "info" })
124
+ callback({ success: { msg: `processing all test4` } })
125
+ }
126
+ }
110
127
 
111
- qObj.process().then(res => {
112
- console.log(`success with all sync processing: (${JSON.stringify(res)})`.green)
113
- }, err => {
114
- console.log(`errors with all sync processing: (${JSON.stringify(err)})`.red)
128
+ var qObj = new queue()
129
+
130
+ qObj.init().process({
131
+ appender: "all",
132
+ exclude_logMsg: ["debug"], /* example ["debug", "info"] */
133
+ process_objects: [tst1, tst2, tst3, tst4]
134
+ }).then((success) => {
135
+ qObj.logMsg({ msg: `test success: {msg: "all objects processed with no errors"}`.success.italic.bold, type: "success" })
136
+ }, (error) => {
137
+ if (typeof error == "string") {
138
+ qObj.logMsg({ msg: `error: ${error}`.error.italic.bold, type: "error" })
139
+ } else {
140
+ let add_s = (error.error_count > 1) ? 's' : ''
141
+ qObj.logMsg({ msg: `${error.error_count} error${add_s} detected`.error.italic.bold, type: "error" })
142
+ }
115
143
  })
116
144
 
117
145
  ```
package/app.js CHANGED
@@ -1,276 +1,187 @@
1
1
  /* @author Jim Manton: jrman@risebroadband.net
2
- * @since 2021-03-19
2
+ * @since 2023-01-15
3
3
  * Main processing app
4
4
  */
5
5
 
6
- var colors = require('colors'),
7
- all = require('./lib/appenders/all'),
8
- func_all = require('./lib/appenders/func_all'),
9
- top_one = require('./lib/appenders/top_one'),
10
- bottom_one = require('./lib/appenders/bottom_one'),
11
- sync_all = require('./lib/appenders/sync_all'),
12
- status = require('./lib/appenders/status'),
13
- name = require('./lib/appenders/name'),
14
- version = require('./lib/appenders/version')
6
+ let base_queue = require("base-queue"),
7
+ log_queue = require("log-queue"),
8
+ fs = require('fs'),
9
+ validPath = require('valid-path')
15
10
 
16
- class QueueObj {
11
+ const { memoryUsage } = require('process')
17
12
 
18
- constructor() {
19
- try {
20
- var t = this
21
- t.id = 0
22
- t.appenders_dir = './lib/appenders/'
23
- t.props = {}
24
- t.all = null
25
- t.top_one = null
26
- t.bottom_one = null
27
- t.array = null
28
- t.status = null
29
- t.version = null
30
- t.stats = false
31
- t.sync_all = null
32
- t.name = null
33
- t.func_all = null
34
- t.objs = []
35
- t.resolve = null
36
- t.reject = null
13
+ var log_data = [
14
+ { props: { id: 100, name: "console_basic", absolute_path: __filename, check: true } }
15
+ ]
37
16
 
38
- t.load = t.load.bind(this)
39
- t.process = t.process.bind(this)
40
- t.getParent = t.getParent.bind(this)
41
- t.getObjectToProcess = t.getObjectToProcess.bind(this)
42
- t.getObjectById = t.getObjectById.bind(this)
43
- t.getObjs = t.getObjs.bind(this)
44
- t.logMsg = t.logMsg.bind(this)
45
- return t
46
- } catch (e) {
47
- e.message = "queueObj app.js constructor error: " + e.message
48
- throw (e)
49
- }
50
- }
51
17
 
52
- getStats() {
53
- return this.stats
54
- }
18
+ var log_object = class log_obj {
19
+ constructor(props) {
20
+ let t = this
21
+ t.id = props.id
22
+ t.log = props.log
23
+ t.name = props.name
24
+ t.path = props.relative_path
25
+ t.absolute_path = props.absolute_path
26
+ t.status = 'init'
27
+ t.errors = false
28
+ t.error_msg = 'none'
55
29
 
56
- getObjectById(id) {
57
- let t = this, i
58
- for (i = 0; i < t.objs.length; i++) {
59
- if (typeof t.objs[i] != 'undefined' &&
60
- typeof t.objs[i].id != 'undefined' &&
61
- t.objs[i].id == id) {
62
- return t.objs[i]
63
- }
30
+ t.process = t.process.bind(t)
31
+ t.do_checks = t.do_checks.bind(t)
32
+
33
+ if (props.check) {
34
+ t.do_checks()
64
35
  }
65
- return null
36
+
37
+ return t
66
38
  }
67
39
 
68
- getObjectByStatus(status) {
69
- let t = this, i
70
- for (i = 0; i < t.objs.length; i++) {
71
- if (typeof t.objs[i] != 'undefined' &&
72
- typeof t.objs[i].status != 'undefined' &&
73
- t.objs[i].status == status) {
74
- return t.objs[i]
75
- }
40
+ do_checks() {
41
+ let t = this, path_to_check,
42
+ last_item = t.absolute_path.split("\\").pop(),
43
+ check_file = t.absolute_path.split(last_item)[0], check_path = t.path.split('../')
44
+
45
+ check_file = check_file.replace(/\\/g, "/");
46
+ path_to_check = validPath(t.path);
47
+
48
+ if (!path_to_check.valid) {
49
+ t.errors = true
50
+ t.error_msg = `id = ${t.id} name(${t.name}) Error in ${path_to_check.data.input}: ${path_to_check.error})`
76
51
  }
77
- return null
78
- }
79
52
 
80
- getObjectByVersion(version) {
81
- let t = this, i
82
- for (i = 0; i < t.objs.length; i++) {
83
- if (typeof t.objs[i] != 'undefined' &&
84
- typeof t.objs[i].version != 'undefined' &&
85
- t.objs[i].version == version) {
86
- return t.objs[i]
53
+ // check_path.map((dat, i) => {
54
+ // if (/^[a-zA-Z._]+$/.test(dat)) {
55
+ // if (dat != '.' || dat != '..')
56
+ // check_file += dat + '/'
57
+ // }
58
+ // })
59
+ // check_file = check_file.slice(0, -1)
60
+ check_file += check_path[1]
61
+ check_file += `${t.name}.js`
62
+ try {
63
+ if (!fs.existsSync(check_file)) {
64
+ t.errors = true
65
+ t.error_msg = `id = ${t.id} name(${t.name}) file (${check_file} does not exist)`
87
66
  }
67
+ } catch (e) {
68
+ e.message = "file_obj do_checks error: " + e.message
69
+ throw (e)
88
70
  }
89
- return null
90
- }
91
-
92
- count() {
93
- return this.objs.length
94
71
  }
95
72
 
96
- get(num) {
97
- if (num < this.objs.length)
98
- return this.objs[num]
99
- return false
73
+ process(callback) {
74
+ let t = this
75
+ if (t.errors)
76
+ callback({ error: {msg: t.error_msg} })
77
+ else {
78
+ callback({ success: {msg: `id = ${t.id} name(${t.name}) success`} })
79
+ }
100
80
  }
81
+ }
101
82
 
102
- getObjectToProcess() {
103
- return this.objs.shift()
104
- }
83
+ exports = module.exports = class QueueObj {
84
+ constructor() {
85
+ var t = this, fname = 'QueueObj.constructor'
86
+ try {
87
+ t.promise = null
88
+ t.resolve = null
89
+ t.reject = null
90
+ t.promise_2q = null
91
+ t.resolve_2q = null
92
+ t.reject_2q = null
93
+ t.successMsg = ''
94
+ t.log_queue = null
105
95
 
106
- getBottomObjectToProcess() {
107
- return this.objs.pop()
108
- }
96
+ t.logMsg = t.logMsg.bind(t)
97
+ t.init = t.init.bind(t)
98
+ t.process = t.process.bind(t)
99
+ t.getFileObject = t.getFileObject.bind(t)
109
100
 
110
- getItemToProcess(itm) {
111
- return this.objs[itm]
112
- }
101
+ // t.logMsg(`QueueObj.constructor`.debug)
113
102
 
114
- logMsg(msg, props = {}) {
115
- console.log(msg)
103
+ return t
104
+ } catch (e) {
105
+ e.message = `QueueObj app.js constructor error: ${e.message}`.error
106
+ console.log(e.message)
107
+ }
116
108
  }
117
109
 
118
- load(props) {
110
+ init() {
111
+ var t = this, fname = `QueueObj.init`
119
112
  try {
120
- var t = this
121
- t.props = props
122
- t.stats = (typeof props.stats != 'undefined') ? props.stats : false;
123
- if (typeof props != `undefined`) {
124
- if (typeof props.appender != `undefined` &&
125
- typeof props.appender == 'string') {
126
- props.getParent = t.getParent
127
- switch (props.appender) {
128
- case 'all':
129
- t.all = new all(props)
130
- break
131
- case 'top_one':
132
- t.top_one = new top_one(props)
133
- break
134
- case 'bottom_one':
135
- t.bottom_one = new bottom_one(props)
136
- break
137
- case 'func_all':
138
- t.func_all = new func_all(props)
139
- break
140
- case 'array':
141
- t.array = new array(props)
142
- break
143
- case 'status':
144
- t.status = new status(props)
145
- break
146
- case 'version':
147
- t.version = new version(props)
148
- break
149
- case 'sync_all':
150
- t.sync_all = new sync_all(props)
151
- break
152
- case 'name':
153
- t.name = new name(props)
154
- break
155
- default:
156
- throw new Error(`appender(${props.appender}) not found`)
157
- }
158
- }
159
- return t
160
- }
113
+ t.promise = new Promise((resolve, reject) => {
114
+ t.resolve = resolve
115
+ t.reject = reject
116
+ })
117
+ t.promise_2q= new Promise((resolve, reject) => {
118
+ t.resolve_2q = resolve
119
+ t.reject_2q = reject
120
+ })
121
+ return t
161
122
  } catch (e) {
162
- e.message = "queueObj app.js load error: " + e.message
163
- t.logMsg(e.message)
164
- throw (e)
123
+ t.logMsg({ msg: `${fname} error: (${e.message})`.error, type: 'error' })
124
+ // e.message = `QueueObj app.js constructor error: ${e.message}`.error
125
+ // console.log(e.message)
165
126
  }
166
127
  }
167
128
 
168
- add(obj) {
169
- var t = this
170
- try {
171
- if (t.all != null) {
172
- obj._getProperty = (o) => {
173
- return 'all'
174
- }
175
- }
176
- if (t.top_one != null) {
177
- obj._getProperty = (o) => {
178
- return 'top_one'
179
- }
180
- }
181
- if (t.bottom_one != null) {
182
- t.objs = []
183
- obj._getProperty = (o) => {
184
- return 'bottom_one'
185
- }
186
- }
187
- if (t.func_all != null) {
188
- obj._getProperty = (o) => {
189
- return 'func_all'
190
- }
191
- }
192
- if (t.sync_all != null) {
193
- obj._getProperty = (o) => {
194
- return 'sync_all'
195
- }
196
- }
197
- if (t.name != null) {
198
- obj._getProperty = (o) => {
199
- return 'name'
200
- }
201
- }
202
- if (typeof obj.status != 'undefined') {
203
- obj._getProperty = (o) => {
204
- return o.status
205
- }
129
+ process(props = {}) {
130
+ let t = this, fname = `app.process`
206
131
 
207
- }
208
- if (typeof obj.name != 'undefined') {
209
- obj._getProperty = (o) => {
210
- return o.name
211
- }
132
+ // if (typeof props.data_to_process_array == 'undefined')
133
+ // t.reject('base_queue no props.data_to_process_array')
212
134
 
213
- }
214
- if (typeof obj.version != 'undefined') {
215
- obj._getProperty = (o) => {
216
- return o.version
217
- }
218
- }
219
- if (t.top_one != null) {
220
- if (t.objs.length == 0) {
221
- t.objs.push(obj)
222
- }
223
- return t
224
- }
225
- t.objs.push(obj)
226
- return t
135
+ if (typeof props.appender == 'undefined')
136
+ t.reject('base_queue no props.appender')
137
+
138
+ if (typeof props.process_objects == 'undefined')
139
+ t.reject(`props.process_objects not defined`)
140
+
141
+ try {
142
+ t.log_queue = new log_queue({
143
+ parent: t,
144
+ relative_path: "../base_queue/appenders/log/",
145
+ exclude_logMsg: props.exclude_logMsg,
146
+ resolve: t.resolve,
147
+ reject: t.reject
148
+ }).init({
149
+ appender: "console_basic",
150
+ process_objects: [log_object],
151
+ data_to_process_array: log_data
152
+ })
153
+ t.base_queue = new base_queue({
154
+ parent: t,
155
+ relative_path: "./appenders/",
156
+ logMsg: t.logMsg,
157
+ resolve: t.resolve_2q,
158
+ reject: t.reject_2q
159
+ }).load(props).process()
160
+ return t.promise_2q
227
161
  } catch (e) {
228
- e.message = "queueObj app.js add error: " + e.message
229
- t.logMsg(e.message.red)
230
- throw (e)
162
+ console.log(`${fname} error: (${e.message})`)
231
163
  }
232
164
  }
233
165
 
234
- getParent() {
235
- return this
236
- }
237
-
238
- getObjs() {
239
- return this.objs
166
+ getFileObject() {
167
+ return this.qJson.get_class_obj_array()
240
168
  }
241
169
 
242
- process(props = {}) {
170
+ logMsg(props = { msg: '', type: '' }) {
171
+ let t = this, fname = "QueueObj.logMsg"
243
172
  try {
244
- var t = this
245
- switch (t.props.appender) {
246
- case 'all':
247
- return t.all.process(props)
248
- case 'top_one':
249
- return t.top_one.process(props)
250
- case 'bottom_one':
251
- return t.bottom_one.process(props)
252
- case 'func_all':
253
- return t.func_all.process(props)
254
- case 'sync':
255
- case 'sync_all':
256
- return t.sync_all.process(props)
257
- case 'name':
258
- return t.name.process(props)
259
- case 'status':
260
- return t.status.process(props)
261
- case 'version':
262
- return t.version.process(props)
263
- default:
264
- throw new Error(`nothing to process`)
173
+ if (typeof props.msg == "undefined")
174
+ throw new Error(`no msg property in (${JSON.stringify(props)}) `)
175
+ if (typeof props.type == "undefined")
176
+ throw new Error(`no type property in (${JSON.stringify(props)}) `)
177
+ if (t.log_queue != null && typeof t.log_queue.logMsg != 'undefined') {
178
+ t.log_queue.logMsg(props)
179
+ } else {
180
+ throw new Error(`t.log_queue does not exist`)
265
181
  }
266
182
  } catch (e) {
267
- e.message = "queueObj app.js load error: " + e.message
268
- t.logMsg(e.message.red)
269
- throw (e)
183
+ e.message = `${fname} error: ${e.message})`
184
+ t.reject(e.message)
270
185
  }
271
186
  }
272
- }
273
-
274
- exports = module.exports = function (props) {
275
- return new QueueObj(props)
276
187
  }
@@ -1,6 +1,6 @@
1
1
  /*
2
2
  * @author Jim Manton: jrman@risebroadband.net
3
- * @since 2021-03-22l
3
+ * @since 2023-2-5l
4
4
  * lib/appenders/all.js
5
5
  */
6
6