Skip to content
Snippets Groups Projects
Commit ff456622 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

add try catch to standalone start

parent 41f96211
No related branches found
No related tags found
1 merge request!19Resolve "Guard erreur 1000003 -> delete le consentement avant de jeter une erreur oauth needed"
Pipeline #55276 passed
...@@ -37,19 +37,23 @@ Sentry.init({ ...@@ -37,19 +37,23 @@ Sentry.init({
}) })
async function standaloneStart(token, pce) { async function standaloneStart(token, pce) {
const grdfData = await getData(token, pce) try {
if (!grdfData) { const grdfData = await getData(token, pce)
log('debug', 'No consent or data for load curve') if (!grdfData) {
return log('debug', 'No consent or data for load curve')
return
}
log('debug', 'Process grdf daily data')
const processedLoadData = await processData(
grdfData,
'com.grandlyon.grdf.day',
['year', 'month', 'day']
)
log('debug', 'Aggregate grdf load data for month and year')
await aggregateMonthAndYearData(processedLoadData)
} catch (error) {
log('error', 'Standalone failed')
} }
log('debug', 'Process grdf daily data')
const processedLoadData = await processData(
grdfData,
'com.grandlyon.grdf.day',
['year', 'month', 'day']
)
log('debug', 'Aggregate grdf load data for month and year')
await aggregateMonthAndYearData(processedLoadData)
} }
const manualExecution = const manualExecution =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment