Skip to content

Refs #39253 - perf 1/4 - Add explicit polling to host table - #1047

Open
adamruzicka wants to merge 2 commits into
theforeman:masterfrom
adamruzicka:perf-part1
Open

Refs #39253 - perf 1/4 - Add explicit polling to host table#1047
adamruzicka wants to merge 2 commits into
theforeman:masterfrom
adamruzicka:perf-part1

Conversation

@adamruzicka

@adamruzicka adamruzicka commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

The host table previously relied on an accidental refresh cascade: parent polling updated Redux state, which changed callback identities, which triggered useEffect, which re-fetched hosts. This adds an explicit setTimeout-based polling chain (5s interval) that stops when the job finishes or on API error, and restarts when filters change.

Requires:

@adamruzicka adamruzicka changed the title Refs #39253 - Add explicit polling to host table Refs #39253 - perf 1/4 - Add explicit polling to host table Jul 27, 2026
if (!jobFinishedRef.current) {
pollTimeoutId.current = setTimeout(
() => makeApiCall(currentPollParams.current),
5000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally LGTM, this failed lint needs to be addressed.

@adamruzicka adamruzicka mentioned this pull request Jul 27, 2026
MariaAga and others added 2 commits July 27, 2026 14:57
The host table previously relied on an accidental refresh cascade:
parent polling updated Redux state, which changed callback identities,
which triggered useEffect, which re-fetched hosts. This adds an
explicit setTimeout-based polling chain (5s interval) that stops
when the job finishes or on API error, and restarts when filters
change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants