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

refactor(robot-server): Utilize unsubscribe flags for dynamic topics #14620

Merged
merged 13 commits into from
Mar 12, 2024
Prev Previous commit
Next Next commit
make poll interval tunable
  • Loading branch information
mjhuff committed Mar 11, 2024
commit dc24831c63d1b25c6e48d14f9a160d16b3fb4376
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

log: logging.Logger = logging.getLogger(__name__)

POLL_INTERVAL = 1


class RunsPublisher:
"""Publishes protocol runs topics."""
Expand Down Expand Up @@ -111,7 +113,7 @@ async def _poll_engine_store(
if self._previous_state_summary_status != current_state_summary_status:
await self._publish_runs_async(run_id=run_id)
self._previous_state_summary_status = current_state_summary_status
await asyncio.sleep(1)
await asyncio.sleep(POLL_INTERVAL)
except asyncio.CancelledError:
self._clean_up_poller()
await self._publish_runs_advise_unsubscribe_async(run_id=run_id)
Expand Down