bulltrackers-module 1.0.463 → 1.0.464
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,5 +1,5 @@
|
|
|
1
|
-
# Data Feeder Pipeline (
|
|
2
|
-
# Orchestrates data fetching with UTC-alignment and
|
|
1
|
+
# Data Feeder Pipeline (Final Verified Version)
|
|
2
|
+
# Orchestrates data fetching with UTC-alignment, Test Mode, and extended Timeouts.
|
|
3
3
|
|
|
4
4
|
main:
|
|
5
5
|
params: [input]
|
|
@@ -11,7 +11,7 @@ main:
|
|
|
11
11
|
- market_date: '${text.split(time.format(sys.now()), "T")[0]}'
|
|
12
12
|
|
|
13
13
|
# --- TEST MODE / SELECTIVE EXECUTION ---
|
|
14
|
-
#
|
|
14
|
+
# Static routing to allow manual testing of specific steps via Input JSON.
|
|
15
15
|
- check_test_mode:
|
|
16
16
|
switch:
|
|
17
17
|
- condition: '${input != null and "target_step" in input}'
|
|
@@ -38,6 +38,8 @@ main:
|
|
|
38
38
|
args:
|
|
39
39
|
url: '${"https://" + location + "-" + project + ".cloudfunctions.net/price-fetcher"}'
|
|
40
40
|
auth: { type: OIDC }
|
|
41
|
+
timeout: 300 # Fixed: Prevents timeout errors for long-running functions
|
|
42
|
+
retry: ${http.default_retry}
|
|
41
43
|
- insights_fetch:
|
|
42
44
|
steps:
|
|
43
45
|
- call_insights_fetcher:
|
|
@@ -45,6 +47,8 @@ main:
|
|
|
45
47
|
args:
|
|
46
48
|
url: '${"https://" + location + "-" + project + ".cloudfunctions.net/insights-fetcher"}'
|
|
47
49
|
auth: { type: OIDC }
|
|
50
|
+
timeout: 300 # Fixed: Prevents timeout errors for long-running functions
|
|
51
|
+
retry: ${http.default_retry}
|
|
48
52
|
|
|
49
53
|
- index_market_data:
|
|
50
54
|
call: http.post
|
|
@@ -53,8 +57,10 @@ main:
|
|
|
53
57
|
body:
|
|
54
58
|
targetDate: '${market_date}'
|
|
55
59
|
auth: { type: OIDC }
|
|
60
|
+
timeout: 300
|
|
56
61
|
|
|
57
62
|
# --- PHASE 2: ALIGN TO MIDNIGHT ---
|
|
63
|
+
# Dynamically calculates seconds remaining until exactly 00:00 UTC.
|
|
58
64
|
- wait_for_midnight:
|
|
59
65
|
assign:
|
|
60
66
|
- now_sec: '${int(sys.now())}'
|
|
@@ -72,6 +78,7 @@ main:
|
|
|
72
78
|
args:
|
|
73
79
|
url: '${"https://" + location + "-" + project + ".cloudfunctions.net/fetch-popular-investors"}'
|
|
74
80
|
auth: { type: OIDC }
|
|
81
|
+
timeout: 300
|
|
75
82
|
except:
|
|
76
83
|
as: e
|
|
77
84
|
steps:
|
|
@@ -86,7 +93,9 @@ main:
|
|
|
86
93
|
args:
|
|
87
94
|
url: '${"https://" + location + "-" + project + ".cloudfunctions.net/social-orchestrator"}'
|
|
88
95
|
auth: { type: OIDC }
|
|
96
|
+
timeout: 300
|
|
89
97
|
|
|
98
|
+
# Fixed: Split assign and call into two separate steps
|
|
90
99
|
- prepare_midnight_index:
|
|
91
100
|
assign:
|
|
92
101
|
- current_date: '${text.split(time.format(sys.now()), "T")[0]}'
|
|
@@ -97,12 +106,14 @@ main:
|
|
|
97
106
|
body:
|
|
98
107
|
targetDate: '${current_date}'
|
|
99
108
|
auth: { type: OIDC }
|
|
109
|
+
timeout: 300
|
|
100
110
|
|
|
101
111
|
- run_global_indexer:
|
|
102
112
|
call: http.post
|
|
103
113
|
args:
|
|
104
114
|
url: '${"https://" + location + "-" + project + ".cloudfunctions.net/root-data-indexer"}'
|
|
105
115
|
auth: { type: OIDC }
|
|
116
|
+
timeout: 300
|
|
106
117
|
|
|
107
118
|
# --- PHASE 4: RECURRING SOCIAL FETCH (UTC Aligned 3hr) ---
|
|
108
119
|
- init_social_loop:
|
|
@@ -116,7 +127,7 @@ main:
|
|
|
116
127
|
- calculate_next_window:
|
|
117
128
|
assign:
|
|
118
129
|
- now_sec_loop: '${int(sys.now())}'
|
|
119
|
-
- window_size: 10800
|
|
130
|
+
- window_size: 10800 # Fixed: Aligns to 03:00, 06:00, 09:00 UTC...
|
|
120
131
|
- sleep_loop: '${window_size - (now_sec_loop % window_size)}'
|
|
121
132
|
|
|
122
133
|
- wait_for_3hr_window:
|
|
@@ -129,7 +140,9 @@ main:
|
|
|
129
140
|
args:
|
|
130
141
|
url: '${"https://" + location + "-" + project + ".cloudfunctions.net/social-orchestrator"}'
|
|
131
142
|
auth: { type: OIDC }
|
|
143
|
+
timeout: 300
|
|
132
144
|
|
|
145
|
+
# Fixed: Split assign and call into two separate steps
|
|
133
146
|
- prepare_recurring_index:
|
|
134
147
|
assign:
|
|
135
148
|
- cur_date_rec: '${text.split(time.format(sys.now()), "T")[0]}'
|
|
@@ -140,6 +153,7 @@ main:
|
|
|
140
153
|
body:
|
|
141
154
|
targetDate: '${cur_date_rec}'
|
|
142
155
|
auth: { type: OIDC }
|
|
156
|
+
timeout: 300
|
|
143
157
|
|
|
144
158
|
- increment:
|
|
145
159
|
assign:
|