[chronojump] Networks will not save to temp, and do not load and upload (encoder or sprint) if there is no networ



commit d1578f3e835a0486677fc360d205ac8885bb2b93
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Jul 26 19:08:03 2021 +0200

    Networks will not save to temp, and do not load and upload (encoder or sprint) if there is no network 
(since wristabands can be reassigned)

 src/gui/app1/chronojump.cs |  4 +++-
 src/gui/app1/encoder.cs    |  3 ++-
 src/gui/networks.cs        | 10 +++++++---
 3 files changed, 12 insertions(+), 5 deletions(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 168aaaf56..18ba88dee 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -5307,7 +5307,9 @@ public partial class ChronoJumpWindow
                if( ! js.UploadSprintData(usdo) )
                {
                        LogB.Error(js.ResultMessage);
-                       SqliteJson.InsertTempSprint(false, usdo); //insert only if could'nt be uploaded
+                       
+                       //since 2.1.3 do not store in Temp, if there are network errors, it is not going to 
be uploaded later, because wristbands can be re-assigned
+                       //SqliteJson.InsertTempSprint(false, usdo); //insert only if couldn't be uploaded
                }
        }
 
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index 72ad0b280..f2f59e7db 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -7557,7 +7557,8 @@ public partial class ChronoJumpWindow
                if(! success) {
                        LogB.Error(js.ResultMessage);
 
-                       SqliteJson.InsertTempEncoder(false, uedfo);
+                       //since 2.1.3 do not store in Temp, if there are network errors, it is not going to 
be uploaded later, because wristbands can be re-assigned
+                       //SqliteJson.InsertTempEncoder(false, uedfo);
 
                        bool showInWindow = false;
                        if(showInWindow)
diff --git a/src/gui/networks.cs b/src/gui/networks.cs
index a860de067..10d15c6a1 100644
--- a/src/gui/networks.cs
+++ b/src/gui/networks.cs
@@ -771,16 +771,20 @@ public partial class ChronoJumpWindow
                }
 
                //----- Start upload temp tests
+
+               //disabled on 2.1.3. being able now to reassign to another person a current rfid (wristband), 
is better to not store data when there is no network.
+               //To avoid uploading problems if person changed.
+
                //select UploadTemp tests (have not been uploaded by network errors)
 
+               /*
                Sqlite.Open(); // ---------------->
 
                List<UploadEncoderDataFullObject> listEncoderTemp = SqliteJson.SelectTempEncoder(true);
                List<UploadSprintDataObject> listSprintTemp = SqliteJson.SelectTempSprint(true);
 
-               /*
                //Upload them
-               TODO: disabled until find why says that database is not open
+               TODO: disabled (2.1.1 aprox) until find why says that database is not open
                if(listEncoderTemp.Count > 0)
                {
                        foreach(UploadEncoderDataFullObject uedfo in listEncoderTemp)
@@ -791,7 +795,6 @@ public partial class ChronoJumpWindow
                                        SqliteJson.DeleteTempEncoder(true, uedfo.uniqueId); //delete the 
record
                        }
                }
-               */
                if(listSprintTemp.Count > 0)
                {
                        foreach(UploadSprintDataObject usdo in listSprintTemp)
@@ -804,6 +807,7 @@ public partial class ChronoJumpWindow
                }
 
                Sqlite.Close(); // <----------------
+               */
 
                //----- End upload temp tests
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]