Compare commits

..

2 Commits

Author SHA1 Message Date
a2a8e0ef9f docs(bruno): preprint in app added 2025-10-20 06:49:09 -05:00
358c41deb4 fix(controller): fix for updating iowa2 server 2025-10-20 06:48:29 -05:00
2 changed files with 17 additions and 5 deletions

View File

@@ -18,7 +18,7 @@ body:json {
"printerId": 7, // 457=22, 458=23
"layoutId": 25,
"numberOfCopies": 0,
"qtyToPrint": 1
"qtyToPrint": 30
}
}

View File

@@ -49,6 +49,18 @@ func UpdateApp(server *socketio.Server) <-chan string {
updates <- msg
server.BroadcastToRoom("/", "update", "updateLogs", msg)
case 1:
var oldService string
var newService string
port := os.Getenv("PORT")
if port == "8081" {
oldService = "LSTV2_2"
newService = "lst_app_2"
} else {
oldService = "LSTV2"
newService = "lst_app"
}
version, err := extractVersion(filepath.Base(zips[0]))
if err != nil {
msg := fmt.Sprintf("could not parse version: %v", err)
@@ -60,9 +72,9 @@ func UpdateApp(server *socketio.Server) <-chan string {
updates <- msg
server.BroadcastToRoom("/", "update", "updateLogs", msg)
// 1. Stop services + pool
stopService("LSTV2")
stopService(oldService)
time.Sleep(1 * time.Second)
stopService("lst_app")
stopService(newService)
//stopAppPool("LogisticsSupportTool")
time.Sleep(1 * time.Second)
@@ -120,9 +132,9 @@ func UpdateApp(server *socketio.Server) <-chan string {
msg = "Starting Services back up"
updates <- msg
server.BroadcastToRoom("/", "update", "updateLogs", msg)
startService("lst_app")
startService(newService)
time.Sleep(2 * time.Second)
startService("LSTV2")
startService(oldService)
time.Sleep(2 * time.Second)
//startAppPool("LogisticsSupportTool")