@punks/backend-entity-manager 0.0.301 → 0.0.304

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.
@@ -6,8 +6,8 @@ export declare class AwsBatchService {
6
6
  submitJob(input: SubmitBatchJobInput): Promise<void>;
7
7
  ensureJobDefinition(definition: AwsJobDefinition): Promise<import("@aws-sdk/client-batch").JobDefinition>;
8
8
  private unregisterJobDefinition;
9
- private ensureJobLogDriver;
10
9
  private registerJobDefinition;
10
+ private ensureJobLogDriver;
11
11
  private getLatestJobDefinition;
12
12
  private getActiveJobDefinitions;
13
13
  private ensureQueue;
package/dist/esm/index.js CHANGED
@@ -40089,16 +40089,8 @@ let AwsBatchService = AwsBatchService_1 = class AwsBatchService {
40089
40089
  jobDefinition: jobDefinitionArn,
40090
40090
  }));
40091
40091
  }
40092
- async ensureJobLogDriver(jobName, definition) { }
40093
40092
  async registerJobDefinition(jobName, definition) {
40094
- const logGroup = definition.infrastructureParams.logGroupName
40095
- ? {
40096
- name: `/aws/batch/job-${definition.infrastructureParams.logGroupName}`,
40097
- }
40098
- : undefined;
40099
- if (logGroup) {
40100
- await ensureJobLogGroup(logGroup.name, this.awsSettings);
40101
- }
40093
+ const logGroup = await this.ensureJobLogDriver(jobName, definition);
40102
40094
  await this.client().send(new RegisterJobDefinitionCommand({
40103
40095
  jobDefinitionName: jobName,
40104
40096
  type: JobDefinitionType.Container,
@@ -40145,6 +40137,18 @@ let AwsBatchService = AwsBatchService_1 = class AwsBatchService {
40145
40137
  },
40146
40138
  }));
40147
40139
  }
40140
+ async ensureJobLogDriver(jobName, definition) {
40141
+ const logGroup = definition.infrastructureParams.logGroupName
40142
+ ? {
40143
+ name: `/aws/batch/job-${definition.infrastructureParams.logGroupName}`,
40144
+ }
40145
+ : undefined;
40146
+ if (!logGroup) {
40147
+ return;
40148
+ }
40149
+ await ensureJobLogGroup(logGroup.name, this.awsSettings);
40150
+ return logGroup;
40151
+ }
40148
40152
  async getLatestJobDefinition(jobName) {
40149
40153
  const jobs = await this.getActiveJobDefinitions(jobName);
40150
40154
  this.logger.debug(`AWS JOB -> latest job definition`, {