Skip to content

Commit f1d6880

Browse files
committed
fix(peach-sync): fixed indentation for cronjob peach client id secret
- Also refactored naming and labelling for PEACH fetch errors. Signed-off-by: qhanson55 <quinn.hanson@gov.bc.ca>
1 parent 04012de commit f1d6880

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

app/src/controllers/peach.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,22 +115,22 @@ export const syncPeachRecords = async (): Promise<Permit[]> => {
115115
);
116116

117117
const records: PeachRecord[] = [];
118-
const failures: { index: number; reason: unknown }[] = [];
118+
const errors: { index: number; reason: unknown }[] = [];
119119
results.forEach((result, index) => {
120120
if (result.status === 'fulfilled') records.push(result.value);
121-
else failures.push({ index: index, reason: result.reason });
121+
else errors.push({ index: index, reason: result.reason });
122122
});
123123

124124
log.verbose('PEACH fetch summary', {
125125
total: results.length,
126126
fetched: records.length,
127-
failed: failures.length
127+
errored: errors.length
128128
});
129129

130-
if (failures.length) {
131-
for (const failure of failures) {
132-
const { recordId, systemId } = systemRecordPermits[failure.index];
133-
log.warn('PEACH fetch failed', { recordId, systemId, error: failure.reason });
130+
if (errors.length) {
131+
for (const error of errors) {
132+
const { recordId, systemId } = systemRecordPermits[error.index];
133+
log.warn('PEACH fetch call error:', { recordId, systemId, error: error.reason });
134134
}
135135
}
136136

charts/pcns/templates/peachsynccronjob.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ spec:
8181
name: {{ include "pcns.configname" . }}-ches-service-account
8282
- name: SERVER_PEACH_CLIENTID
8383
valueFrom:
84-
secretKeyRef:
85-
key: username
86-
name: {{ include "pcns.configname" . }}-peach
84+
secretKeyRef:
85+
key: username
86+
name: {{ include "pcns.configname" . }}-peach
8787
- name: SERVER_PEACH_CLIENTSECRET
8888
valueFrom:
8989
secretKeyRef:

0 commit comments

Comments
 (0)