ConduitPlatform / Conduit

Batteries-included backend that works with any stack.

Home Page:https://getconduit.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Redundant REST router refreshes

kon14 opened this issue · comments

Describe the bug
REST router currently refreshes excessively due to refreshRouter() directly refreshing the Express router instead of scheduling a refresh based on a timeout, much like registerRoute() and registerConduitRoute() already do.

To Reproduce

  1. Set a breakpoint in REST controller's refreshRouter()
  2. Debug Core by itself
  3. Notice excessive refreshes

N of refresh calls would differ based on previously registered routes, but on a fresh Redis state it should be 1.

Expected behavior
refreshRouter() should schedule a router refresh instead of directly refreshing Express.