mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-11-17 01:44:23 +08:00
fix(panel): make self-upgrades durable and observable
This commit is contained in:
@@ -12,9 +12,17 @@ import (
|
||||
|
||||
"go-backend/internal/app"
|
||||
"go-backend/internal/config"
|
||||
"go-backend/internal/panelupgrade"
|
||||
)
|
||||
|
||||
func main() {
|
||||
if len(os.Args) == 3 && os.Args[1] == "panel-upgrade-helper" {
|
||||
if panelupgrade.RunHelper(os.Args[2]) != nil {
|
||||
log.Print("panel upgrade helper stopped; inspect durable job status")
|
||||
os.Exit(1)
|
||||
}
|
||||
return
|
||||
}
|
||||
cfg := config.FromEnv()
|
||||
if cfg.JWTSecret == "" {
|
||||
log.Println("warning: JWT_SECRET is empty")
|
||||
|
||||
Reference in New Issue
Block a user