Skip to content
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

Review arpalazio adapter date logic #992

Open
majesticio opened this issue Apr 12, 2023 · 0 comments
Open

Review arpalazio adapter date logic #992

majesticio opened this issue Apr 12, 2023 · 0 comments

Comments

@majesticio
Copy link
Contributor

We need to review the data consuming logic in the air quality data fetching module to ensure that it's correctly handling older data. The current implementation appears to fetch data from the past 4 days, but it's unclear if this is the desired behavior or if there are any potential issues related to consuming older data.

Concerns

The current implementation in the getStream function defines a fewDaysAgo constant, which is used to filter out data older than 4 days.

const fewDaysAgo = +parseFloat(
  DateTime.local().setZone(timezone).minus({ days: 4 }).ordinal
);

Later in the function, this constant is used to filter out older data:

.filter((x) => x[dayPosition] >= fewDaysAgo)

Is the current 4-day window for fetching data appropriate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant