@cumulus/ingest 16.1.1 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +13 -13
- package/queue.d.ts +71 -59
- package/queue.d.ts.map +1 -1
- package/queue.js +45 -37
- package/queue.js.map +1 -1
- package/src/queue.js +45 -37
- package/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cumulus/ingest",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"description": "Ingest utilities",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.19.0"
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"author": "Cumulus Authors",
|
|
40
40
|
"license": "Apache-2.0",
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@cumulus/aws-client": "
|
|
43
|
-
"@cumulus/common": "
|
|
44
|
-
"@cumulus/db": "
|
|
45
|
-
"@cumulus/errors": "
|
|
46
|
-
"@cumulus/logger": "
|
|
47
|
-
"@cumulus/message": "
|
|
48
|
-
"@cumulus/sftp-client": "
|
|
42
|
+
"@cumulus/aws-client": "18.0.0",
|
|
43
|
+
"@cumulus/common": "18.0.0",
|
|
44
|
+
"@cumulus/db": "18.0.0",
|
|
45
|
+
"@cumulus/errors": "18.0.0",
|
|
46
|
+
"@cumulus/logger": "18.0.0",
|
|
47
|
+
"@cumulus/message": "18.0.0",
|
|
48
|
+
"@cumulus/sftp-client": "18.0.0",
|
|
49
49
|
"aws-sdk": "^2.585.0",
|
|
50
50
|
"cksum": "^1.3.0",
|
|
51
51
|
"encodeurl": "^1.0.2",
|
|
@@ -61,10 +61,10 @@
|
|
|
61
61
|
"tough-cookie": "~4.0.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@cumulus/checksum": "
|
|
65
|
-
"@cumulus/cmrjs": "
|
|
66
|
-
"@cumulus/test-data": "
|
|
67
|
-
"@cumulus/types": "
|
|
64
|
+
"@cumulus/checksum": "18.0.0",
|
|
65
|
+
"@cumulus/cmrjs": "18.0.0",
|
|
66
|
+
"@cumulus/test-data": "18.0.0",
|
|
67
|
+
"@cumulus/types": "18.0.0"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "43bcef7c0d979a05cd2dd559b811f4ac8f85a9b1"
|
|
70
70
|
}
|
package/queue.d.ts
CHANGED
|
@@ -1,82 +1,94 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Enqueue a PDR to be parsed
|
|
3
3
|
*
|
|
4
|
-
* @param {
|
|
5
|
-
* @param {
|
|
6
|
-
* @param {string} params.queueUrl - the SQS queue to add the message to
|
|
7
|
-
* @param {string} params.parsePdrMessageTemplateUri - the S3 URI of template for
|
|
8
|
-
* a PDR parse message
|
|
9
|
-
* @param {Object} params.provider - the provider config to be attached to the message
|
|
10
|
-
* @param {Object} params.collection - the collection config to be attached to the
|
|
11
|
-
* message
|
|
4
|
+
* @param {object} params
|
|
5
|
+
* @param {object} params.collection - the collection config to be attached to the message
|
|
12
6
|
* @param {string} params.parentExecutionArn - parent workflow execution arn to add to the message
|
|
13
|
-
* @param {string}
|
|
14
|
-
*
|
|
15
|
-
* @param {
|
|
16
|
-
* @
|
|
7
|
+
* @param {string} params.parsePdrWorkflow - the S3 URI of template for a PDR parse message
|
|
8
|
+
* @param {object} params.pdr - the PDR to be enqueued for parsing
|
|
9
|
+
* @param {object} params.provider - the provider config to be attached to the message
|
|
10
|
+
* @param {string} params.stack - stack name
|
|
11
|
+
* @param {string} params.systemBucket - system bucket name
|
|
12
|
+
* @param {string} params.queueUrl - the SQS queue to add the message to
|
|
13
|
+
* @param {string} [params.executionNamePrefix]
|
|
14
|
+
* - the prefix to apply to the name of the enqueued execution
|
|
15
|
+
* @param {object} [params.additionalCustomMeta]
|
|
16
|
+
* - additional object to merge into meta object
|
|
17
|
+
* @returns {Promise<string>}
|
|
18
|
+
* - resolves when the message has been enqueued
|
|
17
19
|
*/
|
|
18
20
|
export function enqueueParsePdrMessage({ collection, parentExecutionArn, parsePdrWorkflow, pdr, provider, stack, systemBucket, queueUrl, executionNamePrefix, additionalCustomMeta, }: {
|
|
19
|
-
|
|
20
|
-
queueUrl: string;
|
|
21
|
-
parsePdrMessageTemplateUri: string;
|
|
22
|
-
provider: Object;
|
|
23
|
-
collection: Object;
|
|
21
|
+
collection: object;
|
|
24
22
|
parentExecutionArn: string;
|
|
23
|
+
parsePdrWorkflow: string;
|
|
24
|
+
pdr: object;
|
|
25
|
+
provider: object;
|
|
26
|
+
stack: string;
|
|
27
|
+
systemBucket: string;
|
|
28
|
+
queueUrl: string;
|
|
25
29
|
executionNamePrefix?: string | undefined;
|
|
26
|
-
additionalCustomMeta?:
|
|
27
|
-
}): Promise<
|
|
30
|
+
additionalCustomMeta?: object | undefined;
|
|
31
|
+
}): Promise<string>;
|
|
28
32
|
/**
|
|
29
33
|
* Enqueue a granule to be ingested
|
|
30
34
|
*
|
|
31
|
-
* @param {
|
|
32
|
-
* @param {
|
|
33
|
-
* @param {
|
|
34
|
-
* @param {
|
|
35
|
-
*
|
|
36
|
-
* @param {
|
|
37
|
-
* @param {
|
|
38
|
-
*
|
|
39
|
-
* @param {
|
|
40
|
-
* @param {
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* @
|
|
35
|
+
* @param {object} params
|
|
36
|
+
* @param {object} params.collection - the collection config to be attached to the message
|
|
37
|
+
* @param {object} params.granules - the granules to be enqueued for ingest
|
|
38
|
+
* @param {string} params.parentExecutionArn
|
|
39
|
+
* - parent workflow execution arn to add to the message
|
|
40
|
+
* @param {object} params.provider - the provider config to be attached to the message
|
|
41
|
+
* @param {object} params.messageTemplate - Message template for the workflow
|
|
42
|
+
* @param {object} params.workflow - workflow name & arn object
|
|
43
|
+
* @param {string} params.queueUrl - the SQS queue to add the message to
|
|
44
|
+
* @param {object | undefined} [params.pdr]
|
|
45
|
+
* - an optional PDR to be configured in the message payload
|
|
46
|
+
* @param {string} [params.executionNamePrefix]
|
|
47
|
+
* - the prefix to apply to the name of the enqueued execution
|
|
48
|
+
* @param {object} [params.additionalCustomMeta]
|
|
49
|
+
* - additional object to merge into meta object
|
|
50
|
+
* @returns {Promise<string>}
|
|
51
|
+
* - resolves when the message has been enqueued
|
|
45
52
|
*/
|
|
46
53
|
export function enqueueGranuleIngestMessage({ collection, granules, parentExecutionArn, pdr, provider, messageTemplate, workflow, queueUrl, executionNamePrefix, additionalCustomMeta, }: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
messageTemplate: Object;
|
|
50
|
-
workflow: Object;
|
|
51
|
-
provider: Object;
|
|
52
|
-
collection: Object;
|
|
53
|
-
pdr: Object;
|
|
54
|
+
collection: object;
|
|
55
|
+
granules: object;
|
|
54
56
|
parentExecutionArn: string;
|
|
57
|
+
provider: object;
|
|
58
|
+
messageTemplate: object;
|
|
59
|
+
workflow: object;
|
|
60
|
+
queueUrl: string;
|
|
61
|
+
pdr?: object | undefined;
|
|
55
62
|
executionNamePrefix?: string | undefined;
|
|
56
|
-
additionalCustomMeta?:
|
|
57
|
-
}): Promise<
|
|
63
|
+
additionalCustomMeta?: object | undefined;
|
|
64
|
+
}): Promise<string>;
|
|
58
65
|
/**
|
|
59
66
|
* Enqueue a workflow
|
|
60
67
|
*
|
|
61
|
-
* @param {
|
|
62
|
-
* @param {
|
|
63
|
-
*
|
|
64
|
-
* @param {string}
|
|
65
|
-
* @param {
|
|
66
|
-
* @param {
|
|
67
|
-
*
|
|
68
|
-
* @param {
|
|
69
|
-
* @param {
|
|
70
|
-
*
|
|
71
|
-
* @
|
|
68
|
+
* @param {object} params
|
|
69
|
+
* @param {string} params.parentExecutionArn
|
|
70
|
+
* - parent workflow execution arn to add to the message
|
|
71
|
+
* @param {string} params.stack - stack name
|
|
72
|
+
* @param {string} params.systemBucket - system bucket name
|
|
73
|
+
* @param {object} params.collection - the collection config to be attached to the message
|
|
74
|
+
* @param {object} params.provider - the provider config to be attached to the message
|
|
75
|
+
* @param {object} params.workflow - the workflow to be enqueued
|
|
76
|
+
* @param {object} params.workflowInput - the input that should be passed to the queued workflow
|
|
77
|
+
* @param {string} [params.queueUrl] - an optional SQS queue to add the message to
|
|
78
|
+
* @param {string} [params.executionNamePrefix]
|
|
79
|
+
* - the prefix to apply to the name of the enqueued execution
|
|
80
|
+
* @returns {Promise<string>}
|
|
81
|
+
* - resolves when the message has been enqueued
|
|
72
82
|
*/
|
|
73
83
|
export function enqueueWorkflowMessage({ parentExecutionArn, stack, systemBucket, collection, provider, queueUrl, workflow, workflowInput, executionNamePrefix, additionalCustomMeta, }: {
|
|
74
|
-
workflow: Object;
|
|
75
|
-
workflowInput: Object;
|
|
76
|
-
queueUrl?: string | undefined;
|
|
77
|
-
provider: Object;
|
|
78
|
-
collection: Object;
|
|
79
84
|
parentExecutionArn: string;
|
|
85
|
+
stack: string;
|
|
86
|
+
systemBucket: string;
|
|
87
|
+
collection: object;
|
|
88
|
+
provider: object;
|
|
89
|
+
workflow: object;
|
|
90
|
+
workflowInput: object;
|
|
91
|
+
queueUrl?: string | undefined;
|
|
80
92
|
executionNamePrefix?: string | undefined;
|
|
81
|
-
}): Promise<
|
|
93
|
+
}): Promise<string>;
|
|
82
94
|
//# sourceMappingURL=queue.d.ts.map
|
package/queue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["src/queue.js"],"names":[],"mappings":"AAaA
|
|
1
|
+
{"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["src/queue.js"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAf0B,UAAU,EAAzB,MAAM;IACS,kBAAkB,EAAjC,MAAM;IACS,gBAAgB,EAA/B,MAAM;IACS,GAAG,EAAlB,MAAM;IACS,QAAQ,EAAvB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,YAAY,EAA3B,MAAM;IACS,QAAQ,EAAvB,MAAM;IACU,mBAAmB;IAEnB,oBAAoB;IAElC,QAAQ,MAAM,CAAC,CA+C3B;AAGD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAjB0B,UAAU,EAAzB,MAAM;IACS,QAAQ,EAAvB,MAAM;IACS,kBAAkB,EAAjC,MAAM;IAES,QAAQ,EAAvB,MAAM;IACS,eAAe,EAA9B,MAAM;IACS,QAAQ,EAAvB,MAAM;IACS,QAAQ,EAAvB,MAAM;IACsB,GAAG,GAA/B,MAAM,GAAG,SAAS;IAEF,mBAAmB;IAEnB,oBAAoB;IAElC,QAAQ,MAAM,CAAC,CAkC3B;AAGD;;;;;;;;;;;;;;;;;GAiBG;AACH;IAd0B,kBAAkB,EAAjC,MAAM;IAES,KAAK,EAApB,MAAM;IACS,YAAY,EAA3B,MAAM;IACS,UAAU,EAAzB,MAAM;IACS,QAAQ,EAAvB,MAAM;IACS,QAAQ,EAAvB,MAAM;IACS,aAAa,EAA5B,MAAM;IACU,QAAQ;IACR,mBAAmB;IAEjC,QAAQ,MAAM,CAAC,CAoD3B"}
|
package/queue.js
CHANGED
|
@@ -7,19 +7,21 @@ const { getWorkflowFileKey, templateKey, } = require('@cumulus/common/workflows'
|
|
|
7
7
|
/**
|
|
8
8
|
* Enqueue a PDR to be parsed
|
|
9
9
|
*
|
|
10
|
-
* @param {
|
|
11
|
-
* @param {
|
|
12
|
-
* @param {string} params.queueUrl - the SQS queue to add the message to
|
|
13
|
-
* @param {string} params.parsePdrMessageTemplateUri - the S3 URI of template for
|
|
14
|
-
* a PDR parse message
|
|
15
|
-
* @param {Object} params.provider - the provider config to be attached to the message
|
|
16
|
-
* @param {Object} params.collection - the collection config to be attached to the
|
|
17
|
-
* message
|
|
10
|
+
* @param {object} params
|
|
11
|
+
* @param {object} params.collection - the collection config to be attached to the message
|
|
18
12
|
* @param {string} params.parentExecutionArn - parent workflow execution arn to add to the message
|
|
19
|
-
* @param {string}
|
|
20
|
-
*
|
|
21
|
-
* @param {
|
|
22
|
-
* @
|
|
13
|
+
* @param {string} params.parsePdrWorkflow - the S3 URI of template for a PDR parse message
|
|
14
|
+
* @param {object} params.pdr - the PDR to be enqueued for parsing
|
|
15
|
+
* @param {object} params.provider - the provider config to be attached to the message
|
|
16
|
+
* @param {string} params.stack - stack name
|
|
17
|
+
* @param {string} params.systemBucket - system bucket name
|
|
18
|
+
* @param {string} params.queueUrl - the SQS queue to add the message to
|
|
19
|
+
* @param {string} [params.executionNamePrefix]
|
|
20
|
+
* - the prefix to apply to the name of the enqueued execution
|
|
21
|
+
* @param {object} [params.additionalCustomMeta]
|
|
22
|
+
* - additional object to merge into meta object
|
|
23
|
+
* @returns {Promise<string>}
|
|
24
|
+
* - resolves when the message has been enqueued
|
|
23
25
|
*/
|
|
24
26
|
async function enqueueParsePdrMessage({ collection, parentExecutionArn, parsePdrWorkflow, pdr, provider, stack, systemBucket, queueUrl, executionNamePrefix, additionalCustomMeta = {}, }) {
|
|
25
27
|
const messageTemplate = await getJsonS3Object(systemBucket, templateKey(stack));
|
|
@@ -49,20 +51,23 @@ module.exports.enqueueParsePdrMessage = enqueueParsePdrMessage;
|
|
|
49
51
|
/**
|
|
50
52
|
* Enqueue a granule to be ingested
|
|
51
53
|
*
|
|
52
|
-
* @param {
|
|
53
|
-
* @param {
|
|
54
|
-
* @param {
|
|
55
|
-
* @param {
|
|
56
|
-
*
|
|
57
|
-
* @param {
|
|
58
|
-
* @param {
|
|
59
|
-
*
|
|
60
|
-
* @param {
|
|
61
|
-
* @param {
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* @
|
|
54
|
+
* @param {object} params
|
|
55
|
+
* @param {object} params.collection - the collection config to be attached to the message
|
|
56
|
+
* @param {object} params.granules - the granules to be enqueued for ingest
|
|
57
|
+
* @param {string} params.parentExecutionArn
|
|
58
|
+
* - parent workflow execution arn to add to the message
|
|
59
|
+
* @param {object} params.provider - the provider config to be attached to the message
|
|
60
|
+
* @param {object} params.messageTemplate - Message template for the workflow
|
|
61
|
+
* @param {object} params.workflow - workflow name & arn object
|
|
62
|
+
* @param {string} params.queueUrl - the SQS queue to add the message to
|
|
63
|
+
* @param {object | undefined} [params.pdr]
|
|
64
|
+
* - an optional PDR to be configured in the message payload
|
|
65
|
+
* @param {string} [params.executionNamePrefix]
|
|
66
|
+
* - the prefix to apply to the name of the enqueued execution
|
|
67
|
+
* @param {object} [params.additionalCustomMeta]
|
|
68
|
+
* - additional object to merge into meta object
|
|
69
|
+
* @returns {Promise<string>}
|
|
70
|
+
* - resolves when the message has been enqueued
|
|
66
71
|
*/
|
|
67
72
|
async function enqueueGranuleIngestMessage({ collection, granules, parentExecutionArn, pdr, provider, messageTemplate, workflow, queueUrl, executionNamePrefix, additionalCustomMeta = {}, }) {
|
|
68
73
|
const message = buildQueueMessageFromTemplate({
|
|
@@ -85,17 +90,20 @@ exports.enqueueGranuleIngestMessage = enqueueGranuleIngestMessage;
|
|
|
85
90
|
/**
|
|
86
91
|
* Enqueue a workflow
|
|
87
92
|
*
|
|
88
|
-
* @param {
|
|
89
|
-
* @param {
|
|
90
|
-
*
|
|
91
|
-
* @param {string}
|
|
92
|
-
* @param {
|
|
93
|
-
* @param {
|
|
94
|
-
*
|
|
95
|
-
* @param {
|
|
96
|
-
* @param {
|
|
97
|
-
*
|
|
98
|
-
* @
|
|
93
|
+
* @param {object} params
|
|
94
|
+
* @param {string} params.parentExecutionArn
|
|
95
|
+
* - parent workflow execution arn to add to the message
|
|
96
|
+
* @param {string} params.stack - stack name
|
|
97
|
+
* @param {string} params.systemBucket - system bucket name
|
|
98
|
+
* @param {object} params.collection - the collection config to be attached to the message
|
|
99
|
+
* @param {object} params.provider - the provider config to be attached to the message
|
|
100
|
+
* @param {object} params.workflow - the workflow to be enqueued
|
|
101
|
+
* @param {object} params.workflowInput - the input that should be passed to the queued workflow
|
|
102
|
+
* @param {string} [params.queueUrl] - an optional SQS queue to add the message to
|
|
103
|
+
* @param {string} [params.executionNamePrefix]
|
|
104
|
+
* - the prefix to apply to the name of the enqueued execution
|
|
105
|
+
* @returns {Promise<string>}
|
|
106
|
+
* - resolves when the message has been enqueued
|
|
99
107
|
*/
|
|
100
108
|
async function enqueueWorkflowMessage({ parentExecutionArn, stack, systemBucket, collection, provider, queueUrl, workflow, workflowInput, executionNamePrefix, additionalCustomMeta = {}, }) {
|
|
101
109
|
const messageTemplate = await getJsonS3Object(systemBucket, templateKey(stack));
|
package/queue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue.js","sourceRoot":"","sources":["src/queue.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAC9D,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAE9D,MAAM,EAAE,6BAA6B,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAC5E,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAErE,MAAM,EACJ,kBAAkB,EAClB,WAAW,GACZ,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAC;AAEzC
|
|
1
|
+
{"version":3,"file":"queue.js","sourceRoot":"","sources":["src/queue.js"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAC9D,MAAM,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAE9D,MAAM,EAAE,6BAA6B,EAAE,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAC5E,MAAM,EAAE,iBAAiB,EAAE,GAAG,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAErE,MAAM,EACJ,kBAAkB,EAClB,WAAW,G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EAAE,wBAAwB;QAClC,mBAAmB;QACnB,UAAU,EAAE;YACV,GAAG,oBAAoB;YACvB,UAAU;YACV,QAAQ;SACT;KACF,CAAC,CAAC;IAEH,MAAM,GAAG,GAAG,iBAAiB,CAC3B,OAAO,CAAC,YAAY,CAAC,aAAa,EAClC,OAAO,CAAC,YAAY,CAAC,cAAc,CACpC,CAAC;IAEF,MAAM,cAAc,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAExC,OAAO,GAAG,CAAC;AACb,CAAC;AACD,OAAO,CAAC,sBAAsB,GAAG,sBAAsB,CAAC"}
|
package/src/queue.js
CHANGED
|
@@ -14,19 +14,21 @@ const {
|
|
|
14
14
|
/**
|
|
15
15
|
* Enqueue a PDR to be parsed
|
|
16
16
|
*
|
|
17
|
-
* @param {
|
|
18
|
-
* @param {
|
|
19
|
-
* @param {string} params.queueUrl - the SQS queue to add the message to
|
|
20
|
-
* @param {string} params.parsePdrMessageTemplateUri - the S3 URI of template for
|
|
21
|
-
* a PDR parse message
|
|
22
|
-
* @param {Object} params.provider - the provider config to be attached to the message
|
|
23
|
-
* @param {Object} params.collection - the collection config to be attached to the
|
|
24
|
-
* message
|
|
17
|
+
* @param {object} params
|
|
18
|
+
* @param {object} params.collection - the collection config to be attached to the message
|
|
25
19
|
* @param {string} params.parentExecutionArn - parent workflow execution arn to add to the message
|
|
26
|
-
* @param {string}
|
|
27
|
-
*
|
|
28
|
-
* @param {
|
|
29
|
-
* @
|
|
20
|
+
* @param {string} params.parsePdrWorkflow - the S3 URI of template for a PDR parse message
|
|
21
|
+
* @param {object} params.pdr - the PDR to be enqueued for parsing
|
|
22
|
+
* @param {object} params.provider - the provider config to be attached to the message
|
|
23
|
+
* @param {string} params.stack - stack name
|
|
24
|
+
* @param {string} params.systemBucket - system bucket name
|
|
25
|
+
* @param {string} params.queueUrl - the SQS queue to add the message to
|
|
26
|
+
* @param {string} [params.executionNamePrefix]
|
|
27
|
+
* - the prefix to apply to the name of the enqueued execution
|
|
28
|
+
* @param {object} [params.additionalCustomMeta]
|
|
29
|
+
* - additional object to merge into meta object
|
|
30
|
+
* @returns {Promise<string>}
|
|
31
|
+
* - resolves when the message has been enqueued
|
|
30
32
|
*/
|
|
31
33
|
async function enqueueParsePdrMessage({
|
|
32
34
|
collection,
|
|
@@ -78,20 +80,23 @@ module.exports.enqueueParsePdrMessage = enqueueParsePdrMessage;
|
|
|
78
80
|
/**
|
|
79
81
|
* Enqueue a granule to be ingested
|
|
80
82
|
*
|
|
81
|
-
* @param {
|
|
82
|
-
* @param {
|
|
83
|
-
* @param {
|
|
84
|
-
* @param {
|
|
85
|
-
*
|
|
86
|
-
* @param {
|
|
87
|
-
* @param {
|
|
88
|
-
*
|
|
89
|
-
* @param {
|
|
90
|
-
* @param {
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
* @
|
|
83
|
+
* @param {object} params
|
|
84
|
+
* @param {object} params.collection - the collection config to be attached to the message
|
|
85
|
+
* @param {object} params.granules - the granules to be enqueued for ingest
|
|
86
|
+
* @param {string} params.parentExecutionArn
|
|
87
|
+
* - parent workflow execution arn to add to the message
|
|
88
|
+
* @param {object} params.provider - the provider config to be attached to the message
|
|
89
|
+
* @param {object} params.messageTemplate - Message template for the workflow
|
|
90
|
+
* @param {object} params.workflow - workflow name & arn object
|
|
91
|
+
* @param {string} params.queueUrl - the SQS queue to add the message to
|
|
92
|
+
* @param {object | undefined} [params.pdr]
|
|
93
|
+
* - an optional PDR to be configured in the message payload
|
|
94
|
+
* @param {string} [params.executionNamePrefix]
|
|
95
|
+
* - the prefix to apply to the name of the enqueued execution
|
|
96
|
+
* @param {object} [params.additionalCustomMeta]
|
|
97
|
+
* - additional object to merge into meta object
|
|
98
|
+
* @returns {Promise<string>}
|
|
99
|
+
* - resolves when the message has been enqueued
|
|
95
100
|
*/
|
|
96
101
|
async function enqueueGranuleIngestMessage({
|
|
97
102
|
collection,
|
|
@@ -130,17 +135,20 @@ exports.enqueueGranuleIngestMessage = enqueueGranuleIngestMessage;
|
|
|
130
135
|
/**
|
|
131
136
|
* Enqueue a workflow
|
|
132
137
|
*
|
|
133
|
-
* @param {
|
|
134
|
-
* @param {
|
|
135
|
-
*
|
|
136
|
-
* @param {string}
|
|
137
|
-
* @param {
|
|
138
|
-
* @param {
|
|
139
|
-
*
|
|
140
|
-
* @param {
|
|
141
|
-
* @param {
|
|
142
|
-
*
|
|
143
|
-
* @
|
|
138
|
+
* @param {object} params
|
|
139
|
+
* @param {string} params.parentExecutionArn
|
|
140
|
+
* - parent workflow execution arn to add to the message
|
|
141
|
+
* @param {string} params.stack - stack name
|
|
142
|
+
* @param {string} params.systemBucket - system bucket name
|
|
143
|
+
* @param {object} params.collection - the collection config to be attached to the message
|
|
144
|
+
* @param {object} params.provider - the provider config to be attached to the message
|
|
145
|
+
* @param {object} params.workflow - the workflow to be enqueued
|
|
146
|
+
* @param {object} params.workflowInput - the input that should be passed to the queued workflow
|
|
147
|
+
* @param {string} [params.queueUrl] - an optional SQS queue to add the message to
|
|
148
|
+
* @param {string} [params.executionNamePrefix]
|
|
149
|
+
* - the prefix to apply to the name of the enqueued execution
|
|
150
|
+
* @returns {Promise<string>}
|
|
151
|
+
* - resolves when the message has been enqueued
|
|
144
152
|
*/
|
|
145
153
|
async function enqueueWorkflowMessage({
|
|
146
154
|
parentExecutionArn,
|