swan-cern / jupyterhub-extensions

Customized components of the Jupyterhub server in SWAN (handlers, spawners, templates).
GNU Affero General Public License v3.0
26 stars 14 forks source link

Parallelize token exchange requests #75

Closed etejedor closed 2 years ago

etejedor commented 2 years ago

At the time of committing, token exchange requests to CERN SSO can have a response time of many seconds (> 10). This commit schedules them in one go for asynchronous execution via asyncio.gather, instead of doing them in sequence.

Note that the maximum number of requests done via self.fetch that are in flight in a given moment is still limited by Tornado's AsyncHTTPClient's max_clients setting.