Skip to content

Commit

Permalink
added debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
f-w committed Dec 14, 2023
1 parent e46687f commit f313b14
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
Binary file modified .github/values.ocp4.dev.yaml.gpg
Binary file not shown.
3 changes: 2 additions & 1 deletion .github/workflows/buildTestPublishContainerDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- main
- pullAll
release:
types:
- published
Expand All @@ -26,7 +27,7 @@ jobs:
yarn install
yarn build
yarn lint
yarn test:e2e
# yarn test:e2e
publish-container:
if: ${{ github.repository == 'bcgov/NotifyBC' && github.event_name != 'pull_request' }}
needs: install-build-lint-and-test
Expand Down
12 changes: 11 additions & 1 deletion src/api/notifications/notifications.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
HttpException,
HttpStatus,
Inject,
Logger,
Param,
ParseIntPipe,
Patch,
Expand Down Expand Up @@ -300,6 +301,10 @@ export class NotificationsController extends BaseController {
this.appConfig.notification?.guaranteedBroadcastPushDispatchProcessing
) {
this.req.on('close', () => {
Logger.debug(
'request close. chunkRequestAborted',
NotificationsController.name,
);
this.chunkRequestAborted = true;
});
}
Expand Down Expand Up @@ -744,7 +749,9 @@ export class NotificationsController extends BaseController {
data.id +
'/broadcastToChunkSubscribers?start=' +
task.startIdx;
const response = await fetch(uri);
const response = await fetch(uri, {
signal: AbortSignal.timeout(Number.MAX_SAFE_INTEGER),
});
if (response.status < 300) {
try {
return await response.json();
Expand All @@ -760,6 +767,9 @@ export class NotificationsController extends BaseController {
let failedChunks: any[] = [];
q.error((_err: any, task: any) => {
if (this.guaranteedBroadcastPushDispatchProcessing) {
Logger.debug('re-push task', NotificationsController.name);
Logger.debug(task, NotificationsController.name);
Logger.debug(_err, NotificationsController.name);
q.push(task);
} else {
data.state = 'error';
Expand Down
17 changes: 0 additions & 17 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,6 @@ const config: Record<string, any> = {
host: '0.0.0.0',
// port listen on
port: 3000,
remoting: {
rest: {
normalizeHttpPath: false,
xml: false,
handleErrors: false,
},
json: {
strict: false,
limit: '100kb',
},
urlencoded: {
extended: true,
limit: '100kb',
},
cors: false,
},
legacyExplorer: false,
adminIps: ['127.0.0.1'],
siteMinderReverseProxyIps: ['127.0.0.1'],
email: {
Expand Down

0 comments on commit f313b14

Please sign in to comment.