- Змішані
- 6 серпня 2026 р. о 12:37 UTC
- Авторизація
- Kamo
- Про нас
- 7973b60
Every platform screen backed by this service refreshed on a timer, because this service has no WebSocket and therefore no way to tell anyone anything: the closed-loan trainer tab re-read every 4 seconds while a run was live, DNS provisioning every 15, commerce sync logs and VOIP recording stats every 30, and the domain setup page asked verify-dns once a minute per open tab. PlatformEventPublisher sends these to core NATS and MediaService's new PlatformStompRelayController puts them on STOMP. Core NATS rather than JetStream, matching ThemeProvisionPublisher: this service's stream is CHAT_MESSAGES/chat.>, so a JetStream publish to security.* would fail expected-stream validation and be dropped. At-most-once is the right trade — every consumer also loads over REST when it mounts, so a lost event costs a refresh, never correctness. Wired at the points where the state actually moves: - ClosedLoanTrainerService on each progress write, on claim, and on every terminal state, so the monitor advances exactly when the walk does. - DnsProvisioningService as each record settles, rather than the panel re-reading the whole log hoping something landed. - RetailSyncLogBroadcaster on each sync-log row, via the new shared-lib listener seam, keyed by provider config so an org syncing several providers does not redraw all of them because one moved. Two counters have no such moment, and are handled honestly rather than pretended into events: - The VOIP recording backlog is written by another service entirely, so PlatformStatsWatcher samples it — but on the server, once, and it publishes only when the numbers actually change, so a quiet backlog produces no traffic where the old arrangement re-sent an identical payload to every viewer twice a minute forever. trigger-sync publishes immediately, since it knows the backlog is about to move. - Diagnostics is live JVM/host/database readings where essentially every field differs second to second, so there is nothing discrete to push. It gets a bare tick: one server timer deciding when "now" is worth re-reading, instead of one per open tab each pulling the full snapshot. DomainVerificationWatcher replaces the setup page's polling. DNS propagation and certificate issuance are genuinely external state with no event to subscribe to, so the checking has to happen somewhere — but not in every browser. One sweep covers every waiting domain, takes the 25 least-recently-checked so a backlog of misconfigured domains rotates instead of being re-queried in full, only probes HTTPS once DNS resolves, and publishes only when a domain actually advances. Two existing tests construct these classes directly and were updated for the new constructor parameters. Note: **************** fails on main already (unset EntityManager in the test's hand-built service) and is untouched by this change — verified against a clean HEAD worktree.