kibana/x-pack/plugins/licensing/common
Brandon Kobel 3d67eaaed4
License fetching concurrency (#77560)
* Switching license polling from a switchMap to an exhaustMap

When it's ES is slow to respond with a license, or Kibana is overloaded
and is slow making the request or handling the response, we were trying
to fetch the license again. This will just skip that refresh interval,
and catch it the next time around.

* Explicitly ignoring a 429 from triggering a license refresh

* The existing unit tests pass!

* Only refreshing the license once at a time

* Adding test for the onPreResponse licensing handler

* Removing errant newline

* Removing errant 'foo'

* Now with better comments!

* Fixing oddity with the exhaustMap

* Just a bit of tidying up

* Use process.nextTick() instead of the confusing Promise.resolve

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2020-09-18 09:01:27 -07:00
..
has_license_info_changed.test.ts
has_license_info_changed.ts
license.test.ts
license.ts
license_update.test.ts License fetching concurrency (#77560) 2020-09-18 09:01:27 -07:00
license_update.ts License fetching concurrency (#77560) 2020-09-18 09:01:27 -07:00
licensing.mock.ts
types.ts