bulltrackers-module 1.0.445 → 1.0.446
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Data Feeder Pipeline (V2)
|
|
1
|
+
# Data Feeder Pipeline (V2.1 - Bug Fixed)
|
|
2
2
|
# Orchestrates data fetching with UTC-alignment and Targeted Step execution.
|
|
3
3
|
|
|
4
4
|
main:
|
|
@@ -11,7 +11,6 @@ main:
|
|
|
11
11
|
- market_date: '${text.split(time.format(sys.now()), "T")[0]}'
|
|
12
12
|
|
|
13
13
|
# --- TEST MODE / SELECTIVE EXECUTION ---
|
|
14
|
-
# Allows triggering specific steps by passing {"target_step": "step_name"} in the input.
|
|
15
14
|
- check_test_mode:
|
|
16
15
|
switch:
|
|
17
16
|
- condition: '${input != null and "target_step" in input}'
|
|
@@ -45,12 +44,10 @@ main:
|
|
|
45
44
|
auth: { type: OIDC }
|
|
46
45
|
|
|
47
46
|
# --- PHASE 2: ALIGN TO MIDNIGHT ---
|
|
48
|
-
# Dynamically calculates seconds remaining until 00:00 UTC.
|
|
49
47
|
- wait_for_midnight:
|
|
50
48
|
assign:
|
|
51
49
|
- now_sec: '${int(sys.now())}'
|
|
52
50
|
- day_sec: 86400
|
|
53
|
-
# Calculate seconds until next 00:00 UTC window
|
|
54
51
|
- sleep_midnight: '${day_sec - (now_sec % day_sec)}'
|
|
55
52
|
- do_midnight_sleep:
|
|
56
53
|
call: sys.sleep
|
|
@@ -79,9 +76,11 @@ main:
|
|
|
79
76
|
url: '${"https://" + location + "-" + project + ".cloudfunctions.net/social-orchestrator"}'
|
|
80
77
|
auth: { type: OIDC }
|
|
81
78
|
|
|
82
|
-
|
|
79
|
+
# FIX: Split assign and call into two steps
|
|
80
|
+
- prepare_midnight_index:
|
|
83
81
|
assign:
|
|
84
82
|
- current_date: '${text.split(time.format(sys.now()), "T")[0]}'
|
|
83
|
+
- index_midnight_data:
|
|
85
84
|
call: http.post
|
|
86
85
|
args:
|
|
87
86
|
url: '${"https://" + location + "-" + project + ".cloudfunctions.net/root-data-indexer"}'
|
|
@@ -107,8 +106,7 @@ main:
|
|
|
107
106
|
- calculate_next_window:
|
|
108
107
|
assign:
|
|
109
108
|
- now_sec_loop: '${int(sys.now())}'
|
|
110
|
-
- window_size: 10800
|
|
111
|
-
# Calculates remaining seconds to hit the next 3-hour mark (03, 06, 09...)
|
|
109
|
+
- window_size: 10800
|
|
112
110
|
- sleep_loop: '${window_size - (now_sec_loop % window_size)}'
|
|
113
111
|
|
|
114
112
|
- wait_for_3hr_window:
|
|
@@ -122,9 +120,11 @@ main:
|
|
|
122
120
|
url: '${"https://" + location + "-" + project + ".cloudfunctions.net/social-orchestrator"}'
|
|
123
121
|
auth: { type: OIDC }
|
|
124
122
|
|
|
125
|
-
|
|
123
|
+
# FIX: Split assign and call into two steps
|
|
124
|
+
- prepare_recurring_index:
|
|
126
125
|
assign:
|
|
127
126
|
- cur_date_rec: '${text.split(time.format(sys.now()), "T")[0]}'
|
|
127
|
+
- index_recurring:
|
|
128
128
|
call: http.post
|
|
129
129
|
args:
|
|
130
130
|
url: '${"https://" + location + "-" + project + ".cloudfunctions.net/root-data-indexer"}'
|