|
47 | 47 | parser.add_argument('--local', |
48 | 48 | default=False, |
49 | 49 | action='store_true', |
50 | | - help='Do not offload the listing of subgraphs to the indexer Lambda function. When this option is ' |
51 | | - 'used, this script queries the repository without partitioning, and the indexer notification ' |
52 | | - 'endpoint is invoked for each subgraph individually and concurrently using worker threads. ' |
53 | | - 'This is magnitudes slower than remote (i.e. partitioned) indexing. If this option is not ' |
54 | | - 'used (the default), the set of subgraphs matching the query is partitioned using the ' |
55 | | - 'partition prefix length configured for each of the catalog sources being reindexed. Each ' |
56 | | - 'query partition is processed independently and remotely by the indexer lambda. The index ' |
57 | | - 'Lambda function queries the repository for each partition and queues a notification for each ' |
58 | | - 'matching subgraph in the partition.') |
| 50 | + help=( |
| 51 | + '' if config.enable_bundle_notifications else '**DISABLED** ' |
| 52 | + ) + ( |
| 53 | + 'Do not offload the listing of subgraphs to the indexer Lambda function. When ' |
| 54 | + 'this option is used, this script queries the repository without partitioning, ' |
| 55 | + 'and the indexer notification endpoint is invoked for each subgraph ' |
| 56 | + 'individually and concurrently using worker threads. This is magnitudes slower ' |
| 57 | + 'than remote (i.e. partitioned) indexing. If this option is not used (the ' |
| 58 | + 'default), the set of subgraphs matching the query is partitioned using the ' |
| 59 | + 'partition prefix length configured for each of the catalog sources being ' |
| 60 | + 'reindexed. Each query partition is processed independently and remotely by ' |
| 61 | + 'the indexer lambda. The index Lambda function queries the repository for each ' |
| 62 | + 'partition and queues a notification for each matching subgraph in the ' |
| 63 | + 'partition.' |
| 64 | + ) |
| 65 | + ) |
59 | 66 | parser.add_argument('--catalogs', |
60 | 67 | nargs='+', |
61 | 68 | metavar='NAME', |
@@ -134,6 +141,10 @@ def main(argv: list[str]): |
134 | 141 | every_source = '*' in source_globs |
135 | 142 | sources_by_catalog = azul.sources_by_catalog(args.catalogs) |
136 | 143 |
|
| 144 | + if not config.enable_bundle_notifications and args.local: |
| 145 | + parser.error('Local reindexing is not available while bundle ' |
| 146 | + 'notifications are disabled.') |
| 147 | + |
137 | 148 | if not every_source: |
138 | 149 | if args.local: |
139 | 150 | parser.error('Cannot specify sources when performing a local reindex') |
|
0 commit comments