Skip to content

Commit

Permalink
fix: entries admin
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoSilvestr committed Dec 13, 2023
1 parent 3e699f0 commit ac87ab7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docker/src/plugins/admin/routes/v1/entriesAdmin.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const entriesAdmin = {
fields: {
type: 'string',
description: 'Fields to retrieve',
default: '',
default: '_id,state,seq,dateStart,dateEnd,logs,sources',
},
},
},
Expand Down
10 changes: 1 addition & 9 deletions docker/src/plugins/compounds/sync/utils/improveCompoundPool.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export default async function improveCompoundPool(molecule, options = {}) {
const timeForTimeout = options.timeout || 60000;
const abortController = new AbortController();
const timeout = setTimeout(() => abortController.abort(), timeForTimeout);
let counter = 0;
// if in the queue we have over twice the number of cpu we wait
while (piscina.queueSize > nbCPU * 5) {
await delay(1);
Expand All @@ -42,15 +41,8 @@ export default async function improveCompoundPool(molecule, options = {}) {
return info;
})
.catch((e) => {
// check if it is an abort error
if (e.name !== 'AbortError') {
debug.info(e);
return undefined;
} else {
counter++;
}
debug.info(e);
});
debug.info(`AbortError because of timeout happened: ${counter} times`);
return {
promise,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export default async function improveSubstancePool(molecule, options = {}) {
const timeForTimeout = options.timeout || 60000;
const abortController = new AbortController();
const timeout = setTimeout(() => abortController.abort(), timeForTimeout);
let counter = 0;

while (piscina.queueSize > nbCPU * 5) {
await delay(1);
Expand All @@ -43,15 +42,8 @@ export default async function improveSubstancePool(molecule, options = {}) {
return info;
})
.catch((e) => {
// check if it is an abort error
if (e.name !== 'AbortError') {
debug.info(e);
return undefined;
} else {
counter++;
}
debug.info(e);
});
debug.info(`AbortError because of timeout happened: ${counter} times`);
return {
promise,
};
Expand Down

0 comments on commit ac87ab7

Please sign in to comment.