Fix some progress counts sort of
This commit is contained in:
@@ -48,7 +48,7 @@ async function calculateSalesForecasts(startTime, totalProducts, processedCount
|
||||
elapsed: formatElapsedTime(startTime),
|
||||
remaining: null,
|
||||
rate: calculateRate(startTime, processedCount),
|
||||
percentage: ((processedCount / totalProductsToUpdate) * 100).toFixed(1),
|
||||
percentage: ((processedCount / totalProducts) * 100).toFixed(1),
|
||||
timing: {
|
||||
start_time: new Date(startTime).toISOString(),
|
||||
end_time: new Date().toISOString(),
|
||||
@@ -261,12 +261,12 @@ async function calculateSalesForecasts(startTime, totalProducts, processedCount
|
||||
outputProgress({
|
||||
status: 'running',
|
||||
operation: 'Processing sales forecast batch',
|
||||
current: processedCount,
|
||||
current: processedCount + myProcessedProducts,
|
||||
total: totalProducts,
|
||||
elapsed: formatElapsedTime(startTime),
|
||||
remaining: estimateRemaining(startTime, processedCount, totalProducts),
|
||||
rate: calculateRate(startTime, processedCount),
|
||||
percentage: ((processedCount / totalProductsToUpdate) * 100).toFixed(1),
|
||||
remaining: estimateRemaining(startTime, processedCount + myProcessedProducts, totalProducts),
|
||||
rate: calculateRate(startTime, processedCount + myProcessedProducts),
|
||||
percentage: (((processedCount + myProcessedProducts) / totalProducts) * 100).toFixed(1),
|
||||
timing: {
|
||||
start_time: new Date(startTime).toISOString(),
|
||||
end_time: new Date().toISOString(),
|
||||
|
||||
Reference in New Issue
Block a user