mirror of
https://github.com/KeymonSoft/Lanterna.git
synced 2026-04-20 22:29:17 +00:00
Cierre administativo, cierre de mesa sin venta y envio de errores a push_info
This commit is contained in:
@@ -14,7 +14,9 @@ Sub Process_Globals
|
||||
'These variables can be accessed from all modules.
|
||||
Public rp As RuntimePermissions
|
||||
Dim reqManager As DBRequestManager
|
||||
Dim skmt, errorLog As SQL
|
||||
Dim skmt As SQL
|
||||
Dim Logger As Boolean = False
|
||||
Dim DBReqServer As String = "http://keymon.lat:1782"
|
||||
Dim server, ruta As String
|
||||
'Para los Logs
|
||||
Dim logs As StringBuilder
|
||||
@@ -41,7 +43,7 @@ Sub Service_Create
|
||||
logcat.LogCatStart(Array As String("-v","raw","*:F","B4A:v"), "logcat")
|
||||
#end if
|
||||
logs.Initialize
|
||||
server = "http://keymon.lat:1782"
|
||||
server = "http://keymon.lat:1781"
|
||||
If Logger Then Log($"Starter reqManager server: ${server}"$)
|
||||
Logger = False
|
||||
End Sub
|
||||
@@ -64,12 +66,12 @@ End Sub
|
||||
'Return true to allow the OS default exceptions handler to handle the uncaught exception. 'Para los Logs
|
||||
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
|
||||
'wait for 500ms to allow the logs to be updated.
|
||||
Log(">>>>>>>>> ERROR")
|
||||
Dim jo As JavaObject
|
||||
Dim l As Long = 500: jo.InitializeStatic("java.lang.Thread").RunMethod("sleep", Array(l)) 'Sleep 500ms
|
||||
logcat.LogCatStop
|
||||
logs.Initialize
|
||||
logs.Append("Ver " & Application.VersionName & CRLF)
|
||||
logs.Append("R:" & rutav & CRLF)
|
||||
logs.Append(Application.LabelName & " Ver " & Application.VersionName & CRLF)
|
||||
logs.Append(StackTrace)
|
||||
Subs.revisaBD
|
||||
Subs.errorLog.ExecNonQuery2("INSERT INTO errores(fecha, error) VALUES (?,?)", Array As Object (Subs.fechaKMT(DateTime.now), logs))
|
||||
@@ -82,7 +84,7 @@ Sub Service_Destroy
|
||||
If Logger Then LogColor("starter destroyed", Colors.red)
|
||||
End Sub
|
||||
|
||||
Sub reinicializaReqManager
|
||||
Sub reinicializaReqManager 'ignore
|
||||
reqManager.Initialize(Me, server)
|
||||
If Logger Then Log(server)
|
||||
End Sub
|
||||
@@ -116,4 +118,4 @@ Sub revisaBD 'ignore
|
||||
If Logger Then Log("revisaBD")
|
||||
If Not(File.Exists(ruta, "kmt.db")) Then File.Copy(File.DirAssets, "kmt.db", ruta, "kmt.db")
|
||||
If Not(skmt.IsInitialized) Then skmt.Initialize(ruta, "kmt.db", True)
|
||||
End Sub
|
||||
End Sub
|
||||
Reference in New Issue
Block a user