-
Notifications
You must be signed in to change notification settings - Fork 1.2k
add check for dune dependecies, only run after 6 AM UTC for v1 adapters #10757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…e v1 reload logic
| // Edge case: V2 adapter has yesterday data but it was updated before end of yesterday (incomplete day) | ||
| // Valid update window: 00:00 UTC (today) - 01:00 UTC (today) = fresh data, no refill needed | ||
| // If updatedAt < 00:00 UTC today (i.e., from yesterday), reload after 01:00 UTC today | ||
| if (!runAtCurrTime && haveYesterdayData && yesterdayDataMap.has(id2)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was thinking, what if this logic to storeAll instead, my worry is, this script/file is already complex and the new code is applicable only to store-all task.
was thinking along the lines of, not passing today's data if we want to refill today, and similar for yesterday's data based on the checks in this PR, wdyt?
…into dune-dependencies
| // Edge case 2: V1 DUNE adapters with data updated before 08:00 UTC | ||
| // Only applies to V1 adapters with DUNE dependencies | ||
| // Remove from set to trigger refill after 08:00 UTC | ||
| if (includeInSet && isV1 && hasDune && yesterdayRecord.updatedAt && isAfter8AM) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename as hasDuneDependency to be more clear? (can ignore)
| } | ||
| } | ||
| } catch (e) { | ||
| // If we can't load module, include by default to avoid breaking existing adapters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add error logging here, so we could look into it if code ever reaches here
For each protocol:
Check if yesterday record exists
Load adapter to get version, runAtCurrTime, dependencies
Edge case 1 (V2 incomplete data):
Edge case 2 (V1 DUNE refresh):
Otherwise: Add to set → Skips in handler2