initialize state package in main.go
This commit adds config values to the config package for state configuration. This commit also adds a call to state.Init() to the main function. Signed-off-by: Ava Affine <ava@sunnypup.io>
This commit is contained in:
parent
0a29b35f4b
commit
9d3ca54ad4
2 changed files with 16 additions and 0 deletions
8
main.go
8
main.go
|
|
@ -9,6 +9,7 @@ import (
|
|||
"gitlab.com/whom/bingobot/internal/config"
|
||||
"gitlab.com/whom/bingobot/internal/discord"
|
||||
"gitlab.com/whom/bingobot/internal/logging"
|
||||
"gitlab.com/whom/bingobot/internal/state"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -28,6 +29,13 @@ func main() {
|
|||
|
||||
logging.Init()
|
||||
|
||||
if err := state.Init(
|
||||
config.Get().InMemoryEventCacheSize,
|
||||
config.Get().PersistentCacheStore,
|
||||
); err != nil {
|
||||
log.Fatalf("couldn't initialize state engine: %s", err.Error())
|
||||
}
|
||||
|
||||
err = startBot()
|
||||
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue