@stravigor/devtools 0.4.6 → 0.4.8
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/package.json
CHANGED
|
@@ -16,9 +16,11 @@ export default class JobCollector extends Collector {
|
|
|
16
16
|
private dispatchedListener: Listener | null = null
|
|
17
17
|
private processedListener: Listener | null = null
|
|
18
18
|
private failedListener: Listener | null = null
|
|
19
|
+
private getBatchId: () => string
|
|
19
20
|
|
|
20
|
-
constructor(store: EntryStore, options: CollectorOptions) {
|
|
21
|
+
constructor(store: EntryStore, options: CollectorOptions, getBatchId: () => string) {
|
|
21
22
|
super(store, options)
|
|
23
|
+
this.getBatchId = getBatchId
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
register(): void {
|
|
@@ -30,7 +32,7 @@ export default class JobCollector extends Collector {
|
|
|
30
32
|
queue: string
|
|
31
33
|
payload: unknown
|
|
32
34
|
}) => {
|
|
33
|
-
const batchId =
|
|
35
|
+
const batchId = this.getBatchId()
|
|
34
36
|
|
|
35
37
|
this.record(
|
|
36
38
|
'job',
|
|
@@ -53,7 +55,7 @@ export default class JobCollector extends Collector {
|
|
|
53
55
|
queue: string
|
|
54
56
|
duration: number
|
|
55
57
|
}) => {
|
|
56
|
-
const batchId =
|
|
58
|
+
const batchId = this.getBatchId()
|
|
57
59
|
|
|
58
60
|
this.record(
|
|
59
61
|
'job',
|
|
@@ -77,7 +79,7 @@ export default class JobCollector extends Collector {
|
|
|
77
79
|
error: string
|
|
78
80
|
duration: number
|
|
79
81
|
}) => {
|
|
80
|
-
const batchId =
|
|
82
|
+
const batchId = this.getBatchId()
|
|
81
83
|
|
|
82
84
|
this.record(
|
|
83
85
|
'job',
|
package/src/devtools_manager.ts
CHANGED
|
@@ -120,7 +120,8 @@ export default class DevtoolsManager {
|
|
|
120
120
|
|
|
121
121
|
const jobCollector = new JobCollector(
|
|
122
122
|
DevtoolsManager._entryStore,
|
|
123
|
-
DevtoolsManager._config.collectors.job
|
|
123
|
+
DevtoolsManager._config.collectors.job,
|
|
124
|
+
getBatchId
|
|
124
125
|
)
|
|
125
126
|
|
|
126
127
|
DevtoolsManager._collectors = [
|