console: error out if no flows table is present yet

This commit is contained in:
Vincent Bernat
2022-07-12 21:45:31 +02:00
parent 57d1c11bac
commit 84289c246e

View File

@@ -4,6 +4,7 @@
package console
import (
"errors"
"fmt"
"regexp"
"strconv"
@@ -144,6 +145,9 @@ AND engine LIKE '%MergeTree'
Oldest: oldest[0].T,
})
}
if len(newFlowsTables) == 0 {
return errors.New("no flows table present (yet?)")
}
c.flowsTablesLock.Lock()
c.flowsTables = newFlowsTables