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