5.2 The task registry¶
collect() runs every task returned by _service_tasks() concurrently, each wrapped by
_run_service_collector(name, coroutine) which records a ServiceCoverage entry (SUCCESS
with the asset count, or FAILED with the error) and turns a failure into an empty list. One
failing service never stops the others.
_service_tasks() is built lazily, so excluded tasks never create coroutines:
AsyncAWSCollector._service_tasks(): the base tasks (ec2,s3,rds,vpc,subnets,security_groups,iam_users,iam_roles,lambda,elbv2,ecs,dynamodb,cloudfront,secretsmanager,kms), each a bound_collect_*method. Mixins override most of them with deeper implementations of the same name.iam_usersandiam_rolesare dropped:_collect_iammaps the whole IAM graph in one task.DEEP_TASK_METHODSadds the network fabric and the original deep tasks (route_tables,internet_gateways, …,cloudtrail) by method name._merge_registries()adds the registries of the newer mixin packages. Each registry is a method returning{task_name: (callable, family, is_global)}:_governance_tasks(),_network_ext_tasks(),_application_tasks(),_data_ml_tasks(),_cloudcontrol_tasks(). The family is registered inSERVICE_FAMILIES(without overwriting an existing entry) and global tasks are added to the global set.tagging_sweepis added when enabled.- Outside the primary region every global task is removed (
GLOBAL_TASKSplus registry tasks withis_global=True). select_tasks(names, services, exclude_services)filters by task name or family.kubernetesis a pseudo-family: including it keeps theekstask.