bulltrackers-module 1.0.305 → 1.0.306
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.
|
@@ -137,8 +137,8 @@ async function dispatchComputationPass(config, dependencies, computationManifest
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
// 6. Pub/Sub Dispatch
|
|
140
|
-
const standardTasks = selectedTasks.filter(t => t.resources !== 'high-mem').map(t => ({ ...t, date: selectedDate, pass: passToRun }));
|
|
141
|
-
const highMemTasks = selectedTasks.filter(t => t.resources === 'high-mem').map(t => ({ ...t, date: selectedDate, pass: passToRun }));
|
|
140
|
+
const standardTasks = selectedTasks.filter(t => t.resources !== 'high-mem').map(t => ({ ...t, action: 'RUN_COMPUTATION_DATE', computation: t.name, date: selectedDate, pass: passToRun }));
|
|
141
|
+
const highMemTasks = selectedTasks.filter(t => t.resources === 'high-mem').map(t => ({ ...t, action: 'RUN_COMPUTATION_DATE', computation: t.name, date: selectedDate, pass: passToRun }));
|
|
142
142
|
|
|
143
143
|
const pubPromises = [];
|
|
144
144
|
if (standardTasks.length > 0) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Cloud Workflows: Precision Cursor-Based Orchestrator
|
|
2
|
-
# PURPOSE: Orchestrates 5 passes with
|
|
2
|
+
# PURPOSE: Orchestrates 5 passes with dynamic date detection and cursor logic.
|
|
3
3
|
|
|
4
4
|
main:
|
|
5
5
|
params: [input]
|
|
@@ -8,7 +8,14 @@ main:
|
|
|
8
8
|
assign:
|
|
9
9
|
- project: '${sys.get_env("GOOGLE_CLOUD_PROJECT_ID")}'
|
|
10
10
|
- passes: ["1", "2", "3", "4", "5"]
|
|
11
|
-
|
|
11
|
+
# Dynamically calculate today's date (YYYY-MM-DD) if no date is provided in input
|
|
12
|
+
- current_date: '${text.split(time.format(sys.now()), "T")[0]}'
|
|
13
|
+
- date_to_run: '${default(map.get(input, "date"), current_date)}'
|
|
14
|
+
|
|
15
|
+
- log_start:
|
|
16
|
+
call: sys.log
|
|
17
|
+
args:
|
|
18
|
+
text: '${"Starting Pipeline execution. Target Date Limit: " + date_to_run}'
|
|
12
19
|
|
|
13
20
|
- run_sequential_passes:
|
|
14
21
|
for:
|
|
@@ -37,12 +44,12 @@ main:
|
|
|
37
44
|
|
|
38
45
|
- evaluate_dispatch:
|
|
39
46
|
switch:
|
|
40
|
-
# State 1:
|
|
47
|
+
# State 1: Dispatcher signal to move to the next pass
|
|
41
48
|
- condition: '${dispatch_res.body.status == "MOVE_TO_NEXT_PASS"}'
|
|
42
49
|
assign:
|
|
43
50
|
- pass_complete: true
|
|
44
51
|
|
|
45
|
-
# State 2: Tasks dispatched
|
|
52
|
+
# State 2: Tasks were dispatched
|
|
46
53
|
- condition: '${dispatch_res.body.dispatched > 0}'
|
|
47
54
|
steps:
|
|
48
55
|
- log_dispatch:
|
|
@@ -55,7 +62,7 @@ main:
|
|
|
55
62
|
seconds: '${int(dispatch_res.body.etaSeconds)}'
|
|
56
63
|
- update_cursor:
|
|
57
64
|
assign:
|
|
58
|
-
# If n_cursor_ignored is true
|
|
65
|
+
# If n_cursor_ignored is true, stay on same N to retry (e.g. for high-mem)
|
|
59
66
|
- n_cursor: '${if(dispatch_res.body.n_cursor_ignored, n_cursor, n_cursor + 1)}'
|
|
60
67
|
- next_loop:
|
|
61
68
|
next: sequential_date_loop
|