Skip to content

Commit a80e93f

Browse files
[client] Add default expiration time for fetching expectations
Co-authored-by: antoinemzs <[email protected]>
1 parent 1515166 commit a80e93f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pyoaev/apis/inject_expectation/inject_expectation.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ def expectations_assets_for_source(
2828
result = self.openaev.http_get(
2929
path,
3030
query_data=(
31-
{"expiration_time": expiration_time} if expiration_time else None
31+
{"expiration_time": expiration_time}
32+
if expiration_time
33+
else {
34+
"expiration_time": 360
35+
} # 360 minutes (6 hours) - corresponds to the expiration time configured in the Expectations Expiration Manager.
36+
# Expectations older than this duration will be automatically expired to prevent
37+
# processing outdated data, particularly important when launching new collectors.
3238
),
3339
**kwargs,
3440
)

0 commit comments

Comments
 (0)