5
5
6
6
import click
7
7
import yaml
8
+ from satstac import Collection
8
9
9
10
from stac_updater import resources
10
11
@@ -20,15 +21,17 @@ def new_service():
20
21
shutil .copyfile (sls_template_path , sls_config_path )
21
22
22
23
@stac_updater .command (name = 'update-collection' , short_help = "update a static collection" )
23
- @click .option ('--name' , '-n' , type = str , required = True , help = "Name of collection, must match catalog name referenced by STAC Items." )
24
24
@click .option ('--root' , '-r' , type = str , required = True , help = "URL of collection." )
25
25
@click .option ('--long-poll/--short-poll' , default = False , help = "Enable long polling." )
26
26
@click .option ('--concurrency' , type = int , default = 1 , help = "Sets lambda concurrency limit when polling the queue." )
27
- def update_collection (name , root , long_poll , concurrency ):
27
+ def update_collection (root , long_poll , concurrency ):
28
28
# Create a SQS queue for the collection
29
29
# Subscribe SQS queue to SNS topic with filter policy on collection name
30
30
# Configure lambda function and attach to SQS queue (use ENV variables to pass state)
31
31
32
+ name = Collection .open (root ).id
33
+ print (name )
34
+
32
35
filter_rule = {'collection' : [name ]}
33
36
34
37
with open (sls_config_path , 'r' ) as f :
0 commit comments