Skip to content

Commit

Permalink
Merge pull request #1834 from Inist-CNRS/fix/better-logs
Browse files Browse the repository at this point in the history
Fix(precomputed): Set log to better placement
  • Loading branch information
JulienMattiussi authored Dec 8, 2023
2 parents 02ddf41 + f539bdf commit f49bfaa
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/api/services/precomputed/precomputed.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,14 +312,6 @@ export const processPrecomputed = async (precomputed, ctx) => {
.pipe(
ezs((entry, feed, self) => {
if (self.isLast()) {
logData = JSON.stringify({
level: 'ok',
message: `[Instance: ${ctx.tenant}] 3/10 - End compress data`,
timestamp: new Date(),
status: IN_PROGRESS,
});
jobLogger.info(ctx.job, logData);
notifyListeners(room, logData);
return feed.close();
}
const colums = [];
Expand Down Expand Up @@ -348,6 +340,23 @@ export const processPrecomputed = async (precomputed, ctx) => {
}),
)
.pipe(ezs('TARDump', { compress: true }))
.pipe(
ezs((entry, feed, self) => {
if (self.isLast()) {
logData = JSON.stringify({
level: 'ok',
message: `[Instance: ${ctx.tenant}] 3/10 - End compress data. Start sending to webservice`,
timestamp: new Date(),
status: IN_PROGRESS,
});
jobLogger.info(ctx.job, logData);
notifyListeners(room, logData);
return feed.close();
}

feed.send(entry);
}),
)
.pipe(
ezs('URLConnect', {
url: precomputed.webServiceUrl,
Expand Down

0 comments on commit f49bfaa

Please sign in to comment.