Ignore:
Timestamp:
Feb 6, 2016, 12:54:26 AM (9 years ago)
Author:
chronos
Message:
  • Added: Export task TimeQueued time which is different to TimeStart time which is actual time when task was started to be processed.
  • Fixed: Updated also export of DBC files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Export/cmdmpqexport.php

    r848 r867  
    8585
    8686if(array_key_exists('needgeneration', $_GET)) {
    87   $DbRows = $System->Database->query('SELECT `ClientVersion`.`Version` as Version, `Export`.`Id`,`Export`.`ClientVersion`,`Export`.`OutputType`,`Export`.`Title`,`Export`.`Description` FROM `Export` JOIN `ClientVersion` as `ClientVersion` ON `ClientVersion`.`Id`=`Export`.`ClientVersion` WHERE `Featured`=1 ORDER BY `ClientVersion`.`BuildNumber` DESC');
     87  $DbRows = $System->Database->query('SELECT `ClientVersion`.`Version` AS `Version`, '.
     88    '`Export`.`Id`,`Export`.`ClientVersion`,`Export`.`OutputType`,`Export`.`Title`,'.
     89    '`Export`.`Description` FROM `Export` '.
     90    'JOIN `ClientVersion` AS `ClientVersion` ON `ClientVersion`.`Id`=`Export`.`ClientVersion` '.
     91    'WHERE `Featured`=1 ORDER BY `ClientVersion`.`BuildNumber` DESC');
    8892  while ($DbExport = $DbRows->fetch_assoc()) {
    8993  $Export = new Export($System);
     
    9195  $Output .= $Export->Init();
    9296  if ($Export->NeedGeneration()) {
    93     $DbResult = $System->Database->query('SELECT * FROM ExportTask WHERE Export = '.$Export->Id);
     97    $DbResult = $System->Database->query('SELECT * FROM `ExportTask` WHERE `Export` = '.$Export->Id);
    9498    if($DbResult->num_rows == 0)
    9599    {
    96       $System->Database->query('INSERT INTO ExportTask (`Export` ,`TimeStart` ) VALUES ('.$Export->Id.', NOW())');
     100      $System->Database->query('INSERT INTO `ExportTask` (`Export` ,`TimeStart` ) VALUES ('.$Export->Id.', NOW())');
    97101    } else
    98       $System->Database->query('UPDATE ExportTask SET `TimeStart` = NOW(), `Progress` = 0, `TimeFinish` = NULL WHERE Export = '.$Export->Id);
     102      $System->Database->query('UPDATE `ExportTask` SET `TimeStart` = NOW(), `Progress` = 0, `TimeFinish` = NULL WHERE `Export` = '.$Export->Id);
    99103
    100104    $System->ModuleManager->Modules['Log']->WriteLog('Zadání úlohy pro vygenerování dbc souboru', LOG_TYPE_DOWNLOAD);
Note: See TracChangeset for help on using the changeset viewer.