Skip to content

Commit

Permalink
[CCFPCM-721] error running seeder on local (#297)
Browse files Browse the repository at this point in the history
  • Loading branch information
chelsea-EYDS authored Nov 27, 2023
1 parent 4c02c34 commit 27e4b80
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ migration-run:
@docker exec -it $(PROJECT)-backend ./node_modules/.bin/ts-node -e 'require("./apps/backend/src/database/migrate.ts").handler()'
@docker exec -it $(PROJECT)-backend ./node_modules/.bin/ts-node -e 'require("./apps/backend/src/database/seeder.ts").handler()'

migration-seed:
@docker exec -it $(PROJECT)-backend ./node_modules/.bin/ts-node -e 'require("./apps/backend/src/database/seeder.ts").handler()'

migration-run-ci:
@docker-compose exec -T backend yarn workspace @payment/backend typeorm:run-migrations

Expand Down
14 changes: 8 additions & 6 deletions apps/backend/src/lambdas/batch-reconcile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ export const handler = async (event: BatchHandlerEvent, _context?: Context) => {
end: event.period.to ? new Date(event.period.to) : new Date(),
});

const messages: ReconciliationEventMessage[] = listOfDays.map((date) => ({
reconciliationMaxDate: format(date, 'yyyy-MM-dd'),
program: event.program,
reportEnabled: event.reportEnabled,
byPassFileValidity: event.byPassFileValidity,
}));
const messages: ReconciliationEventMessage[] = listOfDays.map(
(date: Date) => ({
reconciliationMaxDate: format(date, 'yyyy-MM-dd'),
program: event.program,
reportEnabled: event.reportEnabled,
byPassFileValidity: event.byPassFileValidity,
})
);

for (const message of messages) {
if (!isLocal) {
Expand Down
13 changes: 5 additions & 8 deletions apps/backend/src/s3-manager/s3-manager.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@ import { Injectable } from '@nestjs/common';
export class S3ManagerService {
public s3: S3Client;
constructor() {
const config: S3ClientConfig =
process.env.NODE_ENV === 'production'
? {
endpoint: process.env.AWS_ENDPOINT,
region: 'ca-central-1',
forcePathStyle: true,
}
: {};
const config: S3ClientConfig = {
endpoint: process.env.AWS_ENDPOINT,
region: 'ca-central-1',
forcePathStyle: true,
};
this.s3 = new S3Client(config);
}

Expand Down

0 comments on commit 27e4b80

Please sign in to comment.