Commit 460ffc31 authored by Hugo SUBTIL's avatar Hugo SUBTIL
Browse files

fix

parent 24675834
......@@ -154,10 +154,10 @@ const applyPrices = async (client: Client, fluidType: FluidType) => {
fluidType,
date
)
// log(
// 'debug',
// `Step: ${timeStep} | Fluid : ${fluidType} | Date: ${date.day}/${date.month}/${date.year} | Price: ${priceData.price}`
// )
log(
'debug',
`Step: ${timeStep} | Fluid : ${fluidType} | Date: ${date.day}/${date.month}/${date.year} | Price: ${priceData.price}`
)
const tp = await getTimePeriod(timeStep, date)
// Get doc to update
......@@ -196,11 +196,10 @@ const applyPrices = async (client: Client, fluidType: FluidType) => {
const processPrices = async ({ client }: PricesProps) => {
log('info', `Processing electricity data...`)
const elec = applyPrices(client, FluidType.ELECTRICITY)
const elec = await applyPrices(client, FluidType.ELECTRICITY)
log('info', `Electricity data done`)
log('info', `Processing gas data...`)
const gas = applyPrices(client, FluidType.GAS)
await Promise.all([elec, gas])
const gas = await applyPrices(client, FluidType.GAS)
log('info', `Gas data done`)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment