Skip to content

Commit adbf49b

Browse files
authored
feat: add collection loading capability (#160)
* rename StacItemLoader to StacLoader
1 parent 32e78ab commit adbf49b

File tree

12 files changed

+628
-134
lines changed

12 files changed

+628
-134
lines changed

integration_tests/cdk/app.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
PgStacApiLambda,
1515
PgStacDatabase,
1616
StacIngestor,
17-
StacItemLoader,
17+
StacLoader,
1818
StactoolsItemGenerator,
1919
TiPgApiLambda,
2020
TitilerPgstacApiLambda,
@@ -179,9 +179,9 @@ def __init__(
179179
},
180180
)
181181

182-
self.stac_item_loader = StacItemLoader(
182+
self.stac_loader = StacLoader(
183183
self,
184-
"stac-item-loader",
184+
"stac-loader",
185185
pgstac_db=pgstac_db,
186186
batch_size=500,
187187
lambda_timeout_seconds=300,
@@ -190,12 +190,10 @@ def __init__(
190190
self.stac_item_generator = StactoolsItemGenerator(
191191
self,
192192
"stactools-item-generator",
193-
item_load_topic_arn=self.stac_item_loader.topic.topic_arn,
193+
item_load_topic_arn=self.stac_loader.topic.topic_arn,
194194
)
195195

196-
self.stac_item_loader.topic.grant_publish(
197-
self.stac_item_generator.lambda_function
198-
)
196+
self.stac_loader.topic.grant_publish(self.stac_item_generator.lambda_function)
199197

200198
stac_bucket = aws_s3.Bucket(
201199
self,
@@ -204,11 +202,11 @@ def __init__(
204202

205203
stac_bucket.add_event_notification(
206204
aws_s3.EventType.OBJECT_CREATED,
207-
aws_s3_notifications.SnsDestination(self.stac_item_loader.topic),
205+
aws_s3_notifications.SnsDestination(self.stac_loader.topic),
208206
aws_s3.NotificationKeyFilter(suffix=".json"),
209207
)
210208

211-
stac_bucket.grant_read(self.stac_item_loader.lambda_function)
209+
stac_bucket.grant_read(self.stac_loader.lambda_function)
212210

213211

214212
app = App()

lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export * from "./bastion-host";
22
export * from "./database";
33
export * from "./ingestor-api";
44
export * from "./stactools-item-generator";
5-
export * from "./stac-item-loader";
5+
export * from "./stac-loader";
66
export * from "./stac-api";
77
export * from "./titiler-pgstac-api";
88
export * from "./stac-browser";

0 commit comments

Comments
 (0)