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

Services: data fetching rewrite #522

Merged
merged 3 commits into from
Jun 12, 2024
Merged

Conversation

Innders
Copy link
Member

@Innders Innders commented Jun 12, 2024

Description of changes

Better error messages.

Technical details

  • Migrated all queries and mutations to RTK Query.
  • Migrated new service dropdowns to ARC dropdowns.

@Innders Innders requested a review from martastain June 12, 2024 11:07
@Innders Innders self-assigned this Jun 12, 2024
@Innders Innders added the type: maintenance Chores, refactoring, dependencies label Jun 12, 2024
@Innders Innders linked an issue Jun 12, 2024 that may be closed by this pull request
Copy link
Member

@martastain martastain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originally setInterval was used to periodically load service data - especially status. This is no longer available, so service status is not updated and it is necessary to reload the page.

When you starting or stopping a service, you should get a feedback whether service actually started/stopped.

setInterval is probably not the greatest way of doing that, but it worked. Maybe service heartbeat could rather dispatch a fire-and-forget service.heartbeat message with RT updates?

@Innders
Copy link
Member Author

Innders commented Jun 12, 2024

const { data: services = [] } = useGetServicesQuery(undefined, { pollingInterval: 2000, })

image

@Innders Innders requested a review from martastain June 12, 2024 11:41
Copy link
Member

@martastain martastain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works like a charm

@Innders Innders merged commit f266396 into develop Jun 12, 2024
@Innders Innders deleted the 380-Duplicate-service-name-warning branch June 12, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: maintenance Chores, refactoring, dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate service name warning
2 participants