mirror of
https://github.com/KeymonSoft/Kelloggs_V3.git
synced 2026-04-21 06:39:23 +00:00
8/11/23 - Cambios en DBRequestManager
This commit is contained in:
@@ -833,8 +833,15 @@ End Sub
|
|||||||
Sub JobDone(Job As HttpJob)
|
Sub JobDone(Job As HttpJob)
|
||||||
' LogColor("JobDone: "&Job.Tag & " Success:" & Job.Success , Colors.Magenta) ' Mod by CHV - 211116
|
' LogColor("JobDone: "&Job.Tag & " Success:" & Job.Success , Colors.Magenta) ' Mod by CHV - 211116
|
||||||
If inicioContador = "" Then inicioContador = 0
|
If inicioContador = "" Then inicioContador = 0
|
||||||
If Job.Success = False Then
|
If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos.
|
||||||
If logger Then LogColor("** " & Job.Tag & " Error: " & Job.ErrorMessage, Colors.Red) ' Mod by CHV - 211116
|
If reqManager.reqsList.IndexOf(Job.tag) <> -1 Then
|
||||||
|
reqManager.reqsList.RemoveAt(reqManager.reqsList.IndexOf(Job.tag))
|
||||||
|
' LogColor($">>>>>> Quitamos ${Job.tag}"$, Colors.Blue)
|
||||||
|
End If
|
||||||
|
LogColor(">>>>>> " & reqManager.reqsList.Size & " - " & reqManager.reqsList, Colors.Blue)
|
||||||
|
End If
|
||||||
|
If Not(Job.Success) Then
|
||||||
|
LogColor("Error: " & Job.tag & " : " & Job.ErrorMessage, Colors.red)
|
||||||
If Job.ErrorMessage = "STREAM" Then
|
If Job.ErrorMessage = "STREAM" Then
|
||||||
contador_strem = contador_strem +1
|
contador_strem = contador_strem +1
|
||||||
If CARGA = "SUBIR" Then
|
If CARGA = "SUBIR" Then
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ Sub Class_Globals
|
|||||||
Private VERSION As Float = 0.9
|
Private VERSION As Float = 0.9
|
||||||
Private tempArray(1) As Object
|
Private tempArray(1) As Object
|
||||||
Dim jobTagAnterior As String = "" 'Mod por CHV - 211109
|
Dim jobTagAnterior As String = "" 'Mod por CHV - 211109
|
||||||
|
Dim reqsList As List
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Target - The module that handles JobDone (usually Me).
|
'Target - The module that handles JobDone (usually Me).
|
||||||
@@ -23,6 +24,7 @@ End Sub
|
|||||||
Public Sub Initialize (Target As Object, ConnectorLink As String)
|
Public Sub Initialize (Target As Object, ConnectorLink As String)
|
||||||
mTarget = Target
|
mTarget = Target
|
||||||
link = ConnectorLink
|
link = ConnectorLink
|
||||||
|
reqsList.Initialize
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Sends a query request.
|
'Sends a query request.
|
||||||
@@ -33,6 +35,7 @@ Public Sub ExecuteQuery(Command As DBCommand, Limit As Int, Tag As Object)
|
|||||||
Dim j As HttpJob
|
Dim j As HttpJob
|
||||||
Dim ms As OutputStream
|
Dim ms As OutputStream
|
||||||
Dim out2 As OutputStream = StartJob(j,ms, Tag)
|
Dim out2 As OutputStream = StartJob(j,ms, Tag)
|
||||||
|
If reqsList.IsInitialized Then reqsList.Add(Tag)
|
||||||
|
|
||||||
WriteObject(Command.Name, out2)
|
WriteObject(Command.Name, out2)
|
||||||
WriteInt(Limit, out2)
|
WriteInt(Limit, out2)
|
||||||
@@ -59,6 +62,7 @@ End Sub
|
|||||||
|
|
||||||
'Similar to ExecuteBatch. Sends a single command.
|
'Similar to ExecuteBatch. Sends a single command.
|
||||||
Public Sub ExecuteCommand(Command As DBCommand, Tag As Object)
|
Public Sub ExecuteCommand(Command As DBCommand, Tag As Object)
|
||||||
|
If reqsList.IsInitialized Then reqsList.Add(Tag)
|
||||||
ExecuteBatch(Array As DBCommand(Command), Tag)
|
ExecuteBatch(Array As DBCommand(Command), Tag)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ ModuleBreakpoints9=
|
|||||||
ModuleClosedNodes0=
|
ModuleClosedNodes0=
|
||||||
ModuleClosedNodes1=
|
ModuleClosedNodes1=
|
||||||
ModuleClosedNodes10=
|
ModuleClosedNodes10=
|
||||||
ModuleClosedNodes11=
|
ModuleClosedNodes11=1,3,4
|
||||||
ModuleClosedNodes12=
|
ModuleClosedNodes12=
|
||||||
ModuleClosedNodes13=
|
ModuleClosedNodes13=
|
||||||
ModuleClosedNodes14=
|
ModuleClosedNodes14=
|
||||||
@@ -82,6 +82,6 @@ ModuleClosedNodes6=
|
|||||||
ModuleClosedNodes7=
|
ModuleClosedNodes7=
|
||||||
ModuleClosedNodes8=
|
ModuleClosedNodes8=
|
||||||
ModuleClosedNodes9=
|
ModuleClosedNodes9=
|
||||||
NavigationStack=DBRequestManager,HandleJob,193,0,DBRequestManager,ReadByte,179,0,B4XMainPage,ImageView4_Click,531,1,Starter,Service_Create,69,0,C_Cliente,B4XPage_Created,374,0,C_Cliente,GPS_LocationChanged,746,6,C_Cliente,Class_Globals,291,0,Diseñador Visual,cliente.bal,-100,5,C_Cliente,B4XPage_Appear,436,6
|
NavigationStack=B4XMainPage,ImageView4_Click,531,1,Starter,Service_Create,69,0,C_Cliente,B4XPage_Created,374,0,C_Cliente,GPS_LocationChanged,746,6,C_Cliente,Class_Globals,291,0,C_Cliente,B4XPage_Appear,436,6,DBRequestManager,ExecuteQuery,30,0,DBRequestManager,PrintTable,267,0,C_Principal,Class_Globals,0,0,C_Principal,cargar_Click,461,0,C_Principal,JobDone,837,0
|
||||||
SelectedBuild=0
|
SelectedBuild=0
|
||||||
VisibleModules=1,2,3,4,5,6,7,8,9,10,25,17
|
VisibleModules=1,2,3,4,5,6,7,8,9,10,17,11
|
||||||
|
|||||||
Reference in New Issue
Block a user