mirror of
https://github.com/KeymonSoft/jRDC-Multi.git
synced 2026-04-17 21:06:24 +00:00
- VERSION 5.08.31
- Se corrigio que no avisaba cuando el query no requeria parametros y si se enviaban (en el JSONHandler)
This commit is contained in:
19
Manager.bas
19
Manager.bas
@@ -16,13 +16,14 @@ End Sub
|
||||
|
||||
Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
Dim Command As String = req.GetParameter("command")
|
||||
If Command = "" Then Command = "ping"
|
||||
Log($"Command: ${Command}"$)
|
||||
resp.ContentType = "text/html"
|
||||
If Command = "reload" Then 'Reload config.properties
|
||||
' rdcc.Initialize
|
||||
Private estaDB As String = ""
|
||||
' Log(Main.listaDeCP)
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <br/>"$)
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
|
||||
For i = 0 To Main.listaDeCP.Size - 1
|
||||
Main.Connectors.Get(Main.listaDeCP.get(i)).As(RDCConnector).Initialize(Main.listaDeCP.get(i))
|
||||
If Main.listaDeCP.get(i) <> "DB1" Then estaDB = "." & Main.listaDeCP.get(i) Else estaDB = ""
|
||||
@@ -42,7 +43,7 @@ Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
' shl.WorkingDirectory = GlobalParameters.WorkingDirectory
|
||||
' shl.Run(-1)
|
||||
else If Command = "rsx" Then 'Reiniciamos el servidor DBReq
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <br/>"$)
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
|
||||
Log($"Ejecutamos ${File.DirApp}\start.bat"$)
|
||||
resp.Write($"Ejecutamos ${File.DirApp}\start.bat"$)
|
||||
Public shl As Shell
|
||||
@@ -50,13 +51,22 @@ Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
shl.WorkingDirectory = File.DirApp
|
||||
shl.Run(-1)
|
||||
else If Command = "rpm2" Then 'Reiniciamos el proceso DBReq en PM2
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <br/>"$)
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
|
||||
Log($"Ejecutamos ${File.DirApp}\reiniciaProcesoPM2.bat"$)
|
||||
resp.Write($"Ejecutamos ${File.DirApp}\reiniciaProcesoPM2.bat"$)
|
||||
Public shl As Shell
|
||||
shl.Initialize("shl","cmd",Array("/c",File.DirApp & "\reiniciaProcesoPM2.bat " & Main.srvr.Port))
|
||||
shl.WorkingDirectory = File.DirApp
|
||||
shl.Run(-1)
|
||||
else If Command = "reviveBow" Then 'Reiniciamos el proceso DBReq en PM2
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
|
||||
Log($"Ejecutamos ${File.DirApp}\reiniciaProcesoBow.bat"$)
|
||||
resp.Write($"Ejecutamos ${File.DirApp}\reiniciaProcesoBow.bat<br><br>"$)
|
||||
resp.Write($"!!!BOW REINICIANDO!!!"$)
|
||||
Public shl As Shell
|
||||
shl.Initialize("shl","cmd",Array("/c",File.DirApp & "\reiniciaProcesoBow.bat " & Main.srvr.Port))
|
||||
shl.WorkingDirectory = File.DirApp
|
||||
shl.Run(-1)
|
||||
else If Command = "paused" Then
|
||||
GlobalParameters.IsPaused = 1
|
||||
else If Command = "continue" Then
|
||||
@@ -124,6 +134,9 @@ Sub Handle(req As ServletRequest, resp As ServletResponse)
|
||||
j.ToString
|
||||
resp.Write(j.ToString)
|
||||
End If
|
||||
else if Command = "ping" Then
|
||||
resp.Write($"<a href="/test">Test</a> | <a href="/manager?command=reload">Reload</a> | <a href="/manager?command=rpm2">Reiniciar</a> | <a href="/manager?command=reviveBow">Revive Bow</a> | </br></br>"$)
|
||||
resp.Write($"Pong"$)
|
||||
End If
|
||||
If GlobalParameters.mpLogs.IsInitialized Then GlobalParameters.mpLogs.Put(Command, "Manager : " & Command & " - Time : " & DateTime.Time(DateTime.Now))
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user