@punks/backend-entity-manager 0.0.285 → 0.0.286
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/dist/cjs/index.js +17 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +17 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -40018,7 +40018,7 @@ let AwsBatchService = AwsBatchService_1 = class AwsBatchService {
|
|
|
40018
40018
|
const jobDefName = jobDefinitionName(input.jobUid);
|
|
40019
40019
|
const jobDefinition = await this.getLatestJobDefinition(jobDefName);
|
|
40020
40020
|
const jobName = jobInstanceName(input.jobUid, input.instanceId);
|
|
40021
|
-
|
|
40021
|
+
const submitJobRequest = {
|
|
40022
40022
|
jobQueue: queue.jobQueueArn,
|
|
40023
40023
|
jobDefinition: jobDefinition.jobDefinitionArn,
|
|
40024
40024
|
jobName,
|
|
@@ -40026,8 +40026,14 @@ let AwsBatchService = AwsBatchService_1 = class AwsBatchService {
|
|
|
40026
40026
|
command: input.overrides?.command ??
|
|
40027
40027
|
jobDefinition.containerProperties.command,
|
|
40028
40028
|
},
|
|
40029
|
-
}
|
|
40030
|
-
this.logger.info(`AWS JOB -> job
|
|
40029
|
+
};
|
|
40030
|
+
this.logger.info(`AWS JOB -> submitting job ${jobName} ${queue.jobQueueArn}`, {
|
|
40031
|
+
request: submitJobRequest,
|
|
40032
|
+
});
|
|
40033
|
+
const result = await this.client().send(new clientBatch.SubmitJobCommand(submitJobRequest));
|
|
40034
|
+
this.logger.info(`AWS JOB -> job submitted ${jobName} ${queue.jobQueueArn}`, {
|
|
40035
|
+
result,
|
|
40036
|
+
});
|
|
40031
40037
|
}
|
|
40032
40038
|
async ensureJobDefinition(definition) {
|
|
40033
40039
|
const jobName = jobDefinitionName(definition.jobUid);
|
|
@@ -40070,6 +40076,10 @@ let AwsBatchService = AwsBatchService_1 = class AwsBatchService {
|
|
|
40070
40076
|
}
|
|
40071
40077
|
async getLatestJobDefinition(jobName) {
|
|
40072
40078
|
const jobs = await this.getActiveJobDefinitions(jobName);
|
|
40079
|
+
this.logger.debug(`AWS JOB -> latest job definition`, {
|
|
40080
|
+
jobName,
|
|
40081
|
+
jobs,
|
|
40082
|
+
});
|
|
40073
40083
|
return lodash.exports.orderBy(jobs, (x) => x.revision, "desc")[0];
|
|
40074
40084
|
}
|
|
40075
40085
|
async getActiveJobDefinitions(jobName) {
|
|
@@ -40080,11 +40090,15 @@ let AwsBatchService = AwsBatchService_1 = class AwsBatchService {
|
|
|
40080
40090
|
return result.jobDefinitions ?? [];
|
|
40081
40091
|
}
|
|
40082
40092
|
async ensureQueue(queueName) {
|
|
40093
|
+
this.logger.debug(`AWS JOB -> ensuring queue ${queueName}`);
|
|
40083
40094
|
const queue = await this.getQueue(queueName);
|
|
40084
40095
|
if (queue) {
|
|
40096
|
+
this.logger.debug(`AWS JOB -> queue exists ${queueName}`);
|
|
40085
40097
|
return queue;
|
|
40086
40098
|
}
|
|
40099
|
+
this.logger.debug(`AWS JOB -> creating queue ${queueName}`);
|
|
40087
40100
|
await this.createQueue(queueName);
|
|
40101
|
+
this.logger.debug(`AWS JOB -> queue created ${queueName}`);
|
|
40088
40102
|
const currentQueue = await this.getQueue(queueName);
|
|
40089
40103
|
if (!currentQueue) {
|
|
40090
40104
|
throw new Error(`Queue not created -> ${queueName}`);
|