beans
A class to create all the beans used in the API.
Module Contents
Functions
|
Create and return a map of job factories functions. |
Create and return a ConfigClient instance. |
|
Create and return a default requests Session with timeout adapter. |
|
Create and return a BackgroundTaskManager instance. |
|
|
Create and return external API clients. |
|
Create and return an IAM constants instance. |
|
Create and return a Jobs repository instance. |
|
Create and return an ExecutionService instance. |
|
Create and return a Kubernetes client. |
Create and return an AsyncMongo client instance. |
|
|
Create and return an OAuth2ServiceTokenFactory instance. |
Create and return a Panda API client. |
|
Create and return a Redis cache instance. |
|
Create and return a SiteCapabilitiesQueueClient instance. |
|
|
Create and return an InteractiveJobExecutor instance using injected broker service. |
|
Create and return a Panda Job Factory instance. |
|
Create and return a PandaJobDeploymentConfig instance. |
Create and return a TimeoutAdapter instance. |
|
|
Create and return an ExecutionBroker instance with all required clients. |
Create and return a Starlette Config instance. |
|
Create and return a Test Job Factory instance. |
- beans.batch_job_executor_provider(provider=os.getenv('WMS_BACKEND', 'test'))
Create and return a map of job factories functions.
- beans.config_client()
Create and return a ConfigClient instance.
- beans.default_request_session()
Create and return a default requests Session with timeout adapter.
- beans.get_background_tasks_manager()
Create and return a BackgroundTaskManager instance.
- beans.get_external_api_clients(oauth2_service_token_factory=Depends(get_oauth2_service_service_token_factory), config=Depends(starlette_config), session_timeout_adapter=Depends(request_timeout_adapter))
Create and return external API clients.
- beans.get_iam_constants(config=Depends(starlette_config))
Create and return an IAM constants instance. :param config: :return:
- beans.get_job_repository(redis_cache=Depends(get_redis_cache), mongo_client=Depends(get_mongo_client))
Create and return a Jobs repository instance.
- beans.get_jobs_service(job_repository=Depends(get_job_repository), batch_job_executor=Depends(batch_job_executor_provider()), interactive_job_executor=Depends(interactive_job_executor_provider), background_task_manager=Depends(get_background_tasks_manager))
Create and return an ExecutionService instance.
- beans.get_kubernetes_client(panda_deployment_config=Depends(panda_job_deployment_config), job_repository=Depends(get_job_repository))
Create and return a Kubernetes client.
- beans.get_mongo_client()
Create and return an AsyncMongo client instance.
- beans.get_oauth2_service_service_token_factory(config=Depends(starlette_config), redis_cache=Depends(get_redis_cache), iam_constants=Depends(get_iam_constants))
Create and return an OAuth2ServiceTokenFactory instance. :param iam_constants: :param config: :param redis_cache: :return: OAuth2ServiceTokenFactory instance
- beans.get_panda_client()
Create and return a Panda API client.
- beans.get_redis_cache()
Create and return a Redis cache instance.
- beans.get_site_capabilities_queue_client(external_api_clients=Depends(get_external_api_clients), config=Depends(config_client))
Create and return a SiteCapabilitiesQueueClient instance.
- beans.interactive_job_executor_provider(broker_service=Depends(resource_broker_service_provider))
Create and return an InteractiveJobExecutor instance using injected broker service.
- beans.panda_batch_job_executor(panda_client=Depends(get_panda_client), kubernetes_client=Depends(get_kubernetes_client), site_capabilities_queue_client=Depends(get_site_capabilities_queue_client), background_task_manager=Depends(get_background_tasks_manager))
Create and return a Panda Job Factory instance.
- beans.panda_job_deployment_config(cfg=Depends(config_client))
Create and return a PandaJobDeploymentConfig instance.
- beans.request_timeout_adapter()
Create and return a TimeoutAdapter instance.
- beans.resource_broker_service_provider(external_api_clients=Depends(get_external_api_clients))
Create and return an ExecutionBroker instance with all required clients.
- beans.starlette_config()
Create and return a Starlette Config instance.
- beans.test_batch_job_executor()
Create and return a Test Job Factory instance.