-
-
Notifications
You must be signed in to change notification settings - Fork 194
Add configurable default feed fetch interval and related tests #130
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,7 +113,7 @@ public Connector updateFeedsSetting(FeedsSetting feedsSetting) { | |
| connector.setEnabled(feedsSetting.getEnabled()); | ||
| connector.setSubscribeUrl(feedsSetting.getSubscribeUrl()); | ||
| connector.setFolderId(feedsSetting.getFolderId() == null || feedsSetting.getFolderId().equals(0) ? null : feedsSetting.getFolderId()); | ||
| connector.setFetchIntervalSeconds(feedsSetting.getFetchIntervalMinutes() * 60); | ||
| connector.setFetchIntervalSeconds(feedsSetting.getFetchIntervalMinutes() == null ? null : feedsSetting.getFetchIntervalMinutes() * 60); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. app/server/huntly-server/src/main/java/com/huntly/server/service/FeedsService.java:116: Severity: high 🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||
| var result = connectorRepository.save(connector); | ||
| if (!Objects.equals(rawFolderId, connector.getFolderId())) { | ||
| pageRepository.updateFolderIdByConnectorId(connector.getId(), connector.getFolderId()); | ||
|
|
@@ -136,11 +136,8 @@ public FeedsSetting getFeedsSetting(Integer connectorId) { | |
| feedsSetting.setEnabled(connector.getEnabled()); | ||
| feedsSetting.setFolderId(connector.getFolderId()); | ||
| feedsSetting.setSubscribeUrl(connector.getSubscribeUrl()); | ||
| int fetchIntervalMinutes = huntlyProperties.getDefaultFeedFetchIntervalSeconds() / 60; | ||
| if (connector.getFetchIntervalSeconds() != null) { | ||
| fetchIntervalMinutes = connector.getFetchIntervalSeconds() / 60; | ||
| } | ||
| feedsSetting.setFetchIntervalMinutes(fetchIntervalMinutes); | ||
| feedsSetting.setDefaultFetchIntervalMinutes(globalSettingService.getDefaultFeedFetchIntervalMinutes()); | ||
| feedsSetting.setFetchIntervalMinutes(connector.getFetchIntervalSeconds() == null ? null : connector.getFetchIntervalSeconds() / 60); | ||
| return feedsSetting; | ||
| } | ||
| } | ||
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.
app/client/src/components/SettingModal/FeedsFormDialog.tsx:62:
fetchIntervalMinutesvalidation currently allows non-integer values (e.g., 1.5), which may be truncated or rejected when deserializing into a JavaIntegeron the backend. Consider ensuring minutes are validated as whole numbers consistently for both per-feed and global default intervals.Other locations where this applies: app/client/src/components/SettingModal/FeedsSetting.tsx:121
Severity: medium
Other Locations
app/client/src/components/SettingModal/FeedsSetting.tsx:121🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.