Sfoglia il codice sorgente

Elimianr ficheros cuando se inicia una carga

ChCalvoLeon 3 mesi fa
parent
commit
7d24e8a269

+ 7 - 7
html/application/controllers/Parser.php Vedi File

@@ -38,7 +38,7 @@ class Parser extends CI_Controller
38 38
             $idUltimaImportacion = $this->Parser_model->setFechaNuevaImportacion($fechaImportacionLog);
39 39
             $this->Xlsexport_model->getLastDateLog($idUltimaImportacion);
40 40
             $this->fechaCreacionLog = $fechaCarpeta;
41
-            $rutaPerfil = $this->rutaDiaria . "/" . $row->prefijos_tablas;
41
+            $rutaPerfil = $this->rutaDiaria . $row->prefijos_tablas;
42 42
             $this->removeFoldersFromThursdayToMonday($rutaPerfil);
43 43
 
44 44
             $this->newFolder($rutaPerfil);
@@ -50,7 +50,7 @@ class Parser extends CI_Controller
50 50
             }
51 51
 
52 52
             $files = get_filenames($this->rutaDiariaFecha . "/format");
53
-            emailInicioProcesoDescarga($fechaImportacionLog, $files);
53
+            //emailInicioProcesoDescarga($fechaImportacionLog, $files);
54 54
 
55 55
             $this->parserfile->index($this->rutaDiariaFecha, $fechaCarpeta, $row, $idUltimaImportacion);
56 56
         }
@@ -60,7 +60,7 @@ class Parser extends CI_Controller
60 60
 
61 61
         $this->load->library('ExportXls');
62 62
 
63
-        $this->exportxls->exportDatosCompletos();
63
+        //$this->exportxls->exportDatosCompletos();
64 64
 
65 65
         $this->Parser_model->stopParser();
66 66
     }
@@ -177,7 +177,7 @@ class Parser extends CI_Controller
177 177
     {
178 178
         $dayWeek = date('l');
179 179
 
180
-        if ($dayWeek == "Friday") {
180
+        if ($dayWeek == "Friday" || $dayWeek == "Monday") {
181 181
             $folders = glob($ruta . "/*");
182 182
             $thursday = date('Y-m-d', strtotime(date("Y-m-d") . ' -1 days'));
183 183
 
@@ -186,9 +186,9 @@ class Parser extends CI_Controller
186 186
             foreach ($folders as $folder) {
187 187
 
188 188
                 $folderDate = substr($folder, -19, 10);
189
-                if ($folderDate <= $thursday && $folderDate >= $minusSixDays) {
190
-                    eliminarArchivosProcesoCompleto($folder);
191
-                }
189
+                //if ($folderDate <= $thursday && $folderDate >= $minusSixDays) {
190
+                eliminarArchivosProcesoCompleto($folder);
191
+                //}
192 192
             }
193 193
         }
194 194
     }

+ 5 - 1
html/application/controllers/ParserCompleto.php Vedi File

@@ -72,7 +72,9 @@ class Parsercompleto extends CI_Controller
72 72
 
73 73
         $this->load->library('exportXls');
74 74
 
75
-        $this->exportxls->exportDatosCompletos();
75
+        //$this->exportxls->exportDatosCompletos();
76
+
77
+        $this->Parser_model->stopParser();
76 78
     }
77 79
 
78 80
     private function downloadProcess($urlXML)
@@ -175,6 +177,8 @@ class Parsercompleto extends CI_Controller
175 177
 
176 178
         insertBucleDuplicateOnKey($licitaciones['datos'], "vista_datos_licitacion", "");
177 179
     }
180
+
181
+    private function eliminarArchivos() {}
178 182
 }
179 183
 
180 184
 /* End of file ParserCompleto.php */