Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CCFPCM-721] error running seeder on local #297

Merged
merged 2 commits into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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) => ({
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the type on 37

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,
Copy link
Collaborator Author

@chelsea-EYDS chelsea-EYDS Nov 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

during local development AWS_ENDPOINT='http://minio:9000/' (minio)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is currently showing as

AWS_ENDPOINT='http://minio:9000'

In .env.example. Good idea to change?

region: 'ca-central-1',
forcePathStyle: true,
};
this.s3 = new S3Client(config);
}

Expand Down
Loading