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) => { ...@@ -154,10 +154,10 @@ const applyPrices = async (client: Client, fluidType: FluidType) => {
fluidType, fluidType,
date date
) )
// log( log(
// 'debug', 'debug',
// `Step: ${timeStep} | Fluid : ${fluidType} | Date: ${date.day}/${date.month}/${date.year} | Price: ${priceData.price}` `Step: ${timeStep} | Fluid : ${fluidType} | Date: ${date.day}/${date.month}/${date.year} | Price: ${priceData.price}`
// ) )
const tp = await getTimePeriod(timeStep, date) const tp = await getTimePeriod(timeStep, date)
// Get doc to update // Get doc to update
...@@ -196,11 +196,10 @@ const applyPrices = async (client: Client, fluidType: FluidType) => { ...@@ -196,11 +196,10 @@ const applyPrices = async (client: Client, fluidType: FluidType) => {
const processPrices = async ({ client }: PricesProps) => { const processPrices = async ({ client }: PricesProps) => {
log('info', `Processing electricity data...`) 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', `Electricity data done`)
log('info', `Processing gas data...`) log('info', `Processing gas data...`)
const gas = applyPrices(client, FluidType.GAS) const gas = await applyPrices(client, FluidType.GAS)
await Promise.all([elec, gas])
log('info', `Gas data done`) 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