lash/custom-engin #20

Merged
lash merged 13 commits from lash/custom-engin into master 2025-02-06 11:11:49 +01:00
2 changed files with 13 additions and 0 deletions
Showing only changes of commit 23cadc6178 - Show all commits

View File

@ -16,6 +16,7 @@ import (
"git.grassecon.net/grassrootseconomics/sarafu-vise/args"
"git.grassecon.net/grassrootseconomics/sarafu-vise/config"
"git.grassecon.net/grassrootseconomics/sarafu-vise/handlers"
"git.grassecon.net/grassrootseconomics/sarafu-vise/services"
"git.grassecon.net/grassrootseconomics/visedriver/storage"
)
@ -123,6 +124,12 @@ func main() {
os.Exit(1)
}
accountService := services.New(ctx, menuStorageService)
_, err = lhs.GetHandler(accountService)
if err != nil {
fmt.Fprintf(os.Stderr, "get accounts service handler: %v\n", err)
os.Exit(1)
}
en := lhs.GetEngine(cfg, rs, pe)
cint := make(chan os.Signal)

View File

@ -178,6 +178,12 @@ func (s *SshRunner) GetEngine(sessionId string) (engine.Engine, func(), error) {
}
// TODO: this is getting very hacky!
accountService := services.New(ctx, menuStorageService)
_, err = lhs.GetHandler(accountService)
if err != nil {
fmt.Fprintf(os.Stderr, "get accounts service handler: %v\n", err)
os.Exit(1)
}
en := lhs.GetEngine(lhs.Cfg, rs, pe)
closer := func() {
err := menuStorageService.Close(ctx)