ProcessContext#
- class gafaelfawr.factory.ProcessContext(config, http_client, ldap_pool, redis, uid_cache, gid_cache, ldap_group_cache, ldap_group_name_cache, ldap_user_cache, internal_token_cache, notebook_token_cache)#
Bases:
object
Per-process application context.
This object caches all of the per-process singletons that can be reused for every request and only need to be recreated if the application configuration changes. This does not include the database session; each request creates a new scoped session that’s removed at the end of the session to ensure that all transactions are committed or abandoned.
- Parameters:
config (
Config
) –http_client (
AsyncClient
) –ldap_pool (
Optional
[AIOConnectionPool
]) –redis (
Redis
) –uid_cache (
IdCache
) –gid_cache (
IdCache
) –ldap_group_cache (
LDAPCache
[list
[TokenGroup
]]) –ldap_user_cache (
LDAPCache
[LDAPUserData
]) –internal_token_cache (
InternalTokenCache
) –notebook_token_cache (
NotebookTokenCache
) –
Attributes Summary
Gafaelfawr's configuration.
Shared GID cache.
Shared HTTP client.
Shared internal token cache.
Cache of LDAP group information.
Cache of LDAP group names.
Connection pool to talk to LDAP, if configured.
Cache of LDAP user data.
Shared notebook token cache.
Connection pool to use to talk to Redis.
Shared UID cache.
Attributes Documentation
-
http_client:
AsyncClient
# Shared HTTP client.
-
internal_token_cache:
InternalTokenCache
# Shared internal token cache.
-
ldap_group_cache:
LDAPCache
[list
[TokenGroup
]]# Cache of LDAP group information.
-
ldap_pool:
Optional
[AIOConnectionPool
]# Connection pool to talk to LDAP, if configured.
-
ldap_user_cache:
LDAPCache
[LDAPUserData
]# Cache of LDAP user data.
-
notebook_token_cache:
NotebookTokenCache
# Shared notebook token cache.