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

chore: refactor watch system resource hook #2048

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Feb 16, 2024

Describe Your Changes

  • Fetch system resource information once on app startup
  • Refactor system resource hook to add watch, stop watching and fetch once
  • Hooks should not trigger DataLoader fetch again
// useGetSystemResources.ts

return {
  /**
   * Fetch resource informations once
   */
  getSystemResources,
  /**
   *  Fetch & watch for resource update
   */
  watch,
  /**
   *  Stop watching
   */
  stopWatching,
}

Fixes Issues

  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@github-actions github-actions bot added the type: chore Maintenance, integration, packaging related label Feb 16, 2024
@louis-jan louis-jan force-pushed the chore/refactor-get-system-resource branch from 9b5d7c7 to 422b708 Compare February 16, 2024 05:14
@louis-jan louis-jan merged commit 63cffca into dev Feb 16, 2024
7 checks passed
@louis-jan louis-jan deleted the chore/refactor-get-system-resource branch February 16, 2024 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore Maintenance, integration, packaging related
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants