mirror of
https://github.com/karma-riuk/crab-webapp.git
synced 2025-07-05 14:18:12 +02:00
small fix on evaluate refinement
This commit is contained in:
@ -48,12 +48,12 @@ export const evaluate_comments = (answers, percent_cb) => {
|
|||||||
return results;
|
return results;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const evaluate_refinement = async (answers, percent_cb, finished_cb) => {
|
export const evaluate_refinement = (answers, percent_cb) => {
|
||||||
const total = Object.keys(answers).length;
|
const total = Object.keys(answers).length;
|
||||||
let i = 0;
|
let i = 0;
|
||||||
for (const [key, value] of Object.entries(answers)) {
|
for (const [key, value] of Object.entries(answers)) {
|
||||||
console.log(`Processing ${key}: ${value}...`);
|
console.log(`Processing ${key}: ${value}...`);
|
||||||
await new Promise((res) => setTimeout(res, 1000));
|
// await new Promise((res) => setTimeout(res, 1000));
|
||||||
console.log("Done");
|
console.log("Done");
|
||||||
percent_cb(Math.floor((++i / total) * 100));
|
percent_cb(Math.floor((++i / total) * 100));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user