bulltrackers-module 1.0.734 → 1.0.735
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/functions/computation-system-v2/index.js +5 -0
- package/index.js +8 -39
- package/package.json +1 -1
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
const { Orchestrator } = require('./framework');
|
|
17
17
|
const config = require('./config/bulltrackers.config');
|
|
18
|
+
const { ManifestBuilder } = require('./framework/core/Manifest');
|
|
19
|
+
const { Computation } = require('./framework/core/Computation');
|
|
18
20
|
|
|
19
21
|
// Add computations to config
|
|
20
22
|
config.computations = [
|
|
@@ -146,6 +148,9 @@ module.exports = {
|
|
|
146
148
|
// Main API
|
|
147
149
|
analyze,
|
|
148
150
|
execute,
|
|
151
|
+
ManifestBuilder,
|
|
152
|
+
Computation,
|
|
153
|
+
|
|
149
154
|
runComputation, // <--- New Method
|
|
150
155
|
getManifest,
|
|
151
156
|
warmCache,
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Main entry point for the Bulltrackers shared module.
|
|
3
|
-
*
|
|
3
|
+
* CLEANED: Removed legacy V1 Dispatcher/Computation references.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Core utilities
|
|
@@ -20,9 +20,9 @@ const {
|
|
|
20
20
|
const { checkDiscoveryNeed, getDiscoveryCandidates, dispatchDiscovery } = require('./functions/orchestrator/helpers/discovery_helpers');
|
|
21
21
|
const { getUpdateTargets, dispatchUpdates } = require('./functions/orchestrator/helpers/update_helpers');
|
|
22
22
|
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
const
|
|
23
|
+
// --- COMPUTATION SYSTEM V2 (The new standard) ---
|
|
24
|
+
// We import the WHOLE package now, which includes handlers AND ManifestBuilder
|
|
25
|
+
const computationSystemV2 = require('./functions/computation-system-v2/index');
|
|
26
26
|
|
|
27
27
|
// Task Engine
|
|
28
28
|
const { handleRequest: taskRequest } = require('./functions/task-engine/handler_creator');
|
|
@@ -30,9 +30,6 @@ const { handleDiscover } = require('./functions
|
|
|
30
30
|
const { handleVerify } = require('./functions/task-engine/helpers/verify_helpers');
|
|
31
31
|
const { handleUpdate } = require('./functions/task-engine/helpers/update_helpers');
|
|
32
32
|
|
|
33
|
-
// --- COMPUTATION SYSTEM V2 (Replaces v1) ---
|
|
34
|
-
const computationSystemV2 = require('./functions/computation-system-v2/handlers/index');
|
|
35
|
-
|
|
36
33
|
const { createApiV2App } = require('./functions/api-v2/index');
|
|
37
34
|
|
|
38
35
|
// Maintenance & Backfills
|
|
@@ -79,10 +76,7 @@ const orchestrator = {
|
|
|
79
76
|
dispatchUpdates,
|
|
80
77
|
};
|
|
81
78
|
|
|
82
|
-
|
|
83
|
-
handleRequest: dispatchRequest,
|
|
84
|
-
dispatchTasksInBatches,
|
|
85
|
-
};
|
|
79
|
+
// [REMOVED] Legacy 'dispatcher' pipe. It is replaced by computationSystemV2.
|
|
86
80
|
|
|
87
81
|
const taskEngine = {
|
|
88
82
|
handleRequest: taskRequest,
|
|
@@ -91,12 +85,7 @@ const taskEngine = {
|
|
|
91
85
|
handleUpdate,
|
|
92
86
|
};
|
|
93
87
|
|
|
94
|
-
|
|
95
|
-
const computationSystem = {
|
|
96
|
-
computeScheduler: computationSystemV2.computeScheduler,
|
|
97
|
-
computeDispatcher: computationSystemV2.computeDispatcher,
|
|
98
|
-
computeOnDemand: computationSystemV2.computeOnDemand
|
|
99
|
-
};
|
|
88
|
+
const computationSystem = computationSystemV2; // Direct mapping
|
|
100
89
|
|
|
101
90
|
const api = {
|
|
102
91
|
createApiV2App,
|
|
@@ -130,25 +119,5 @@ const alertSystem = {
|
|
|
130
119
|
};
|
|
131
120
|
|
|
132
121
|
module.exports = {
|
|
133
|
-
pipe: { core, orchestrator,
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
// CLI handling: If running as a script with backfill arguments, execute the backfill
|
|
137
|
-
if (require.main === module) {
|
|
138
|
-
const args = process.argv.slice(2);
|
|
139
|
-
|
|
140
|
-
// Check if this looks like a backfill command
|
|
141
|
-
const isBackfillCommand = args.some(arg =>
|
|
142
|
-
arg.startsWith('--startDate=') ||
|
|
143
|
-
arg.startsWith('--endDate=') ||
|
|
144
|
-
arg.startsWith('--dataType=')
|
|
145
|
-
);
|
|
146
|
-
|
|
147
|
-
if (isBackfillCommand) {
|
|
148
|
-
console.log('🚀 Starting backfill from main entry point...\n');
|
|
149
|
-
backfillTaskEngineData(null, null).catch(error => {
|
|
150
|
-
console.error('Fatal error:', error);
|
|
151
|
-
process.exit(1);
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
}
|
|
122
|
+
pipe: { core, orchestrator, taskEngine, computationSystem, api, maintenance, proxy, alertSystem },
|
|
123
|
+
};
|