Skip to content

Commit

Permalink
let me make sure the config is right
Browse files Browse the repository at this point in the history
  • Loading branch information
etcart committed Jan 22, 2025
1 parent 21fe9f9 commit dacde25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 111 deletions.
110 changes: 0 additions & 110 deletions example/cumulus-tf/ecs_move_granule_collections.asl.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,122 +6,12 @@
"Parameters": {
"cma": {
"event": {
"payload": {
"granules": ["MOD11A1.A2017200.h19v04.006.2017201090724"]
}
},
"task_config": {
"buckets": "{$.meta.buckets}",
"provider": "{$.meta.provider}",
"sourceCollection": "{$.meta.sourceCollection}",
"targetCollection": "{$.meta.targetCollection}"
},
"meta": {
"targetCollection": {
"files": [
{
"regex": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}\\.hdf$",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724.hdf",
"bucket": "protected"
},
{
"regex": "^BROWSE\\.MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}\\.hdf$",
"sampleFileName": "BROWSE.MOD11A1.A2017200.h19v04.006.2017201090724.hdf",
"bucket": "private"
},
{
"regex": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}\\.hdf\\.met$",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724.hdf.met",
"bucket": "private"
},
{
"regex": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}\\.cmr\\.xml$",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724.cmr.xml",
"bucket": "public"
},
{
"regex": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}_2\\.jpg$",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724_2.jpg",
"bucket": "public"
},
{
"regex": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}_1\\.jpg$",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724_1.jpg",
"bucket": "public",
"url_path": "move-granule-collection-testing-target/jpg/example2/"
}
],
"url_path": "move-granule-collection-testing-target",
"name": "MOD11A2",
"granuleIdExtraction": "(MOD11A1\\.(.*))\\.hdf",
"granuleId": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}$",
"dataType": "MOD11A2",
"process": "modis",
"version": "006",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724.hdf",
"id": "MOD11A2"
},
"sourceCollection": {
"files": [
{
"regex": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}\\.hdf$",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724.hdf",
"bucket": "protected"
},
{
"regex": "^BROWSE\\.MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}\\.hdf$",
"sampleFileName": "BROWSE.MOD11A1.A2017200.h19v04.006.2017201090724.hdf",
"bucket": "private"
},
{
"regex": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}\\.hdf\\.met$",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724.hdf.met",
"bucket": "private"
},
{
"regex": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}\\.cmr\\.xml$",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724.cmr.xml",
"bucket": "public"
},
{
"regex": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}_2\\.jpg$",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724_2.jpg",
"bucket": "public"
},
{
"regex": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}_1\\.jpg$",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724_1.jpg",
"bucket": "public",
"url_path": "move-granule-collection-testing-target/jpg/example2/"
}
],
"url_path": "move-granule-collection-testing-target",
"name": "MOD11A1",
"granuleIdExtraction": "(MOD11A1\\.(.*))\\.hdf",
"granuleId": "^MOD11A1\\.A[\\d]{7}\\.[\\S]{6}\\.006.[\\d]{13}$",
"dataType": "MOD11A1",
"process": "modis",
"version": "006",
"sampleFileName": "MOD11A1.A2017200.h19v04.006.2017201090724.hdf",
"id": "MOD11A1"
},
"buckets": {
"internal": {
"name": "cumulus-test-sandbox-internal"
},
"private": {
"name": "cumulus-test-sandbox-private",
"type": "private"
},
"protected": {
"name": "cumulus-test-sandbox-protected",
"type": "protected"
},
"public": {
"name": "cumulus-test-sandbox-public",
"type": "public"
}
}
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion tasks/move-granule-collections/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ async function moveGranules(event: MoveGranuleCollectionsEvent): Promise<Object>

log.debug(`moveGranules config: s3MultipartChunksizeMb: ${s3MultipartChunksizeMb}, `
+ `granuleMetadataFileExtension ${granuleMetadataFileExtension}, `
+ `granuleIds ${event.input.granules}`);
+ `granuleIds ${event.input.granules}, `
+ `meta ${event.config}`);

const granuleIds = event.input.granules;
const granulesInput = await Promise.all(granuleIds.map((granuleId) => getGranule({
Expand Down

0 comments on commit dacde25

Please sign in to comment.