refactor: workflow condition node

refactor: workflow condition node
This commit is contained in:
Fu Diwei
2025-05-28 23:30:38 +08:00
parent 3a829ad53b
commit 6731c465e7
59 changed files with 1140 additions and 988 deletions

View File

@@ -26,9 +26,7 @@ func main() {
app := app.GetApp().(*pocketbase.PocketBase)
var flagHttp string
var flagDir string
flag.StringVar(&flagHttp, "http", "127.0.0.1:8090", "HTTP server address")
flag.StringVar(&flagDir, "dir", "/pb_data/database", "Pocketbase data directory")
if len(os.Args) < 2 {
slog.Error("[CERTIMATE] missing exec args")
os.Exit(1)
@@ -59,14 +57,17 @@ func main() {
Priority: 999,
})
app.OnServe().BindFunc(func(e *core.ServeEvent) error {
slog.Info("[CERTIMATE] Visit the website: http://" + flagHttp)
return e.Next()
})
app.OnTerminate().BindFunc(func(e *core.TerminateEvent) error {
routes.Unregister()
slog.Info("[CERTIMATE] Exit!")
return e.Next()
})
slog.Info("[CERTIMATE] Visit the website: http://" + flagHttp)
if err := app.Start(); err != nil {
slog.Error("[CERTIMATE] Start failed.", "err", err)
}