Skip to content

Commit ed722e0

Browse files
committed
networkDesign: add a few log statements during execution
Get more information when the cache collection reading fails and the job ID in completion status update.
1 parent cedea2b commit ed722e0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/chaire-lib-backend/src/services/json2capnp/Json2CapnpRust.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ class Json2CapnpRust implements Json2CapnpBase {
5555
}
5656
return args.collection;
5757
} else {
58-
console.error(`error loading ${collectionName} collection cache using json2capnp`);
58+
console.error(
59+
`error loading ${collectionName} collection cache using json2capnp with args: ${JSON.stringify(args)}, response: ${typeof response === 'string' ? response : typeof response === 'object' && response !== null ? Object.keys(response) : typeof response}`
60+
);
5961
throw new TrError(`Cannot load ${collectionName} collection`, 'CAQCFC0001', 'CannotLoadCacheBecauseError');
6062
}
6163
}

packages/transition-backend/src/tasks/TransitionWorkerPool.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const wrapEvolutionaryTransitNetworkDesign = async (task: EvolutionaryTransitNet
128128
progressEmitter: newProgressEmitter(task),
129129
isCancelled: getTaskCancelledFct(task)
130130
});
131-
console.log('Evolutionary transit network design job completed with status ', status);
131+
console.log(`Evolutionary transit network design job ${task.attributes.id} completed with status ${status}`);
132132
// TODO Handle results here
133133
return status === 'success';
134134
};

0 commit comments

Comments
 (0)