浏览代码

Elimianr ficheros cuando se inicia una carga

ChCalvoLeon 3 个月前
父节点
当前提交
7d24e8a269
共有 2 个文件被更改,包括 12 次插入8 次删除
  1. 7 7
      html/application/controllers/Parser.php
  2. 5 1
      html/application/controllers/ParserCompleto.php

+ 7 - 7
html/application/controllers/Parser.php 查看文件

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

72
 
72
 
73
         $this->load->library('exportXls');
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
     private function downloadProcess($urlXML)
80
     private function downloadProcess($urlXML)
175
 
177
 
176
         insertBucleDuplicateOnKey($licitaciones['datos'], "vista_datos_licitacion", "");
178
         insertBucleDuplicateOnKey($licitaciones['datos'], "vista_datos_licitacion", "");
177
     }
179
     }
180
+
181
+    private function eliminarArchivos() {}
178
 }
182
 }
179
 
183
 
180
 /* End of file ParserCompleto.php */
184
 /* End of file ParserCompleto.php */