@punks/backend-entity-manager 0.0.295 → 0.0.296

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 CHANGED
@@ -40085,25 +40085,27 @@ let AwsBatchService = AwsBatchService_1 = class AwsBatchService {
40085
40085
  await this.client().send(new clientBatch.RegisterJobDefinitionCommand({
40086
40086
  jobDefinitionName: jobName,
40087
40087
  type: clientBatch.JobDefinitionType.Container,
40088
- platformCapabilities: [clientBatch.PlatformCapability.FARGATE],
40088
+ platformCapabilities: definition.infrastructureParams.computePlatformType === "ec2"
40089
+ ? [clientBatch.PlatformCapability.EC2]
40090
+ : [clientBatch.PlatformCapability.FARGATE],
40089
40091
  containerProperties: {
40090
- command: definition.defaultCommand,
40091
- image: definition.image,
40092
+ command: definition.invocationParams.startCommand,
40093
+ image: definition.infrastructureParams.dockerImage,
40092
40094
  executionRoleArn: this.awsSettings.batchExecutionRole,
40093
40095
  resourceRequirements: [
40094
40096
  {
40095
40097
  type: clientBatch.ResourceType.MEMORY,
40096
- value: definition.memory.toString(),
40098
+ value: definition.infrastructureParams.memory.toString(),
40097
40099
  },
40098
40100
  {
40099
40101
  type: clientBatch.ResourceType.VCPU,
40100
- value: definition.vcpu.toString(),
40102
+ value: definition.infrastructureParams.vcpu.toString(),
40101
40103
  },
40102
- ...(definition.gpuMemory
40104
+ ...(definition.infrastructureParams.gpuMemory
40103
40105
  ? [
40104
40106
  {
40105
40107
  type: clientBatch.ResourceType.GPU,
40106
- value: definition.gpuMemory.toString(),
40108
+ value: definition.infrastructureParams.gpuMemory.toString(),
40107
40109
  },
40108
40110
  ]
40109
40111
  : []),
@@ -40209,15 +40211,12 @@ let AwsJobsProvider = class AwsJobsProvider {
40209
40211
  }
40210
40212
  async upsertJobDefinition(input) {
40211
40213
  const { definition } = input;
40212
- const awsInfraParams = definition.infrastructureParams;
40213
- const awsInvocationParams = definition.invocationParams;
40214
+ const infrastructureParams = definition.infrastructureParams;
40215
+ const invocationParams = definition.invocationParams;
40214
40216
  await this.awsBatchService.ensureJobDefinition({
40215
- image: awsInfraParams.dockerImage,
40216
40217
  jobUid: definition.uid,
40217
- memory: awsInfraParams.memory,
40218
- gpuMemory: awsInfraParams.gpuMemory,
40219
- vcpu: awsInfraParams.vcpu,
40220
- defaultCommand: awsInvocationParams.startCommand,
40218
+ infrastructureParams,
40219
+ invocationParams,
40221
40220
  });
40222
40221
  }
40223
40222
  async getJobStatus(input) {