Changeset 670 for trunk/Modules/Export/ProcessTask.php
- Timestamp:
- Dec 24, 2013, 5:48:40 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/ProcessTask.php
r666 r670 14 14 $System->Run(); 15 15 16 function SetProgres($Export,$per) { 17 $File = new FileStream(); 18 $File->CreateFile($Export->TempDir.'progress'); 19 $File->WriteLine(10); 20 } 21 16 22 while(1) 17 23 { … … 28 34 $Export->Id = $DbRow['ExportId']; 29 35 $Export->Init(); 36 37 SetProgres($Export,10); 38 30 39 echo('Mazání starých souborů...'."\n"); 31 40 … … 42 51 if(file_exists($Export->TempDir.'CzWoW_DBC.zip')) unlink($Export->TempDir.'CzWoW_DBC.zip'); 43 52 53 SetProgres($Export,20); 44 54 if(function_exists('gzcompress')) 45 55 { … … 48 58 exec('zip -r -j '.$Export->TempDir.'CzWoW_DBC.zip '.$Export->TempDir.'dbc/'); 49 59 echo('Hotovo'."\n"); 60 SetProgres($Export,80); 50 61 } else echo('Funkce pro tvorbu Zip souboru není podporována!'."\n"); 51 62 $System->Database->query('UPDATE `ExportTask` SET `TimeFinish`=NOW() WHERE `Export`='.$Export->Id); … … 54 65 echo 'Caught exception: ', $e->getMessage(), "\n"; 55 66 } 67 SetProgres($Export,100); 56 68 } else 57 69 {
Note:
See TracChangeset
for help on using the changeset viewer.