issue #0001908 : Wait more time to download file

This commit is contained in:
Michael RICOIS 2014-03-24 13:54:14 +00:00
parent 9b7f290ee6
commit dc36edbf8f
3 changed files with 14 additions and 12 deletions

View File

@ -33,7 +33,9 @@ class TelechargementController extends Zend_Controller_Action
}
// Suppression du fichier si le temps de cache est depasse
if (file_exists($this->path.'/'.$file)){
if ( $this->filetime == 0 && file_exists($this->path.'/'.$file) ){
unlink($this->path.'/'.$file);
} elseif ( file_exists($this->path.'/'.$file) ) {
$dateFile = filemtime($this->path.'/'.$file);
$now = mktime(date('G'), date('i'), date('s'),
date('m') , date('d'), date('Y'));
@ -82,7 +84,7 @@ class TelechargementController extends Zend_Controller_Action
*/
public function consommationAction()
{
$this->filetime = 1;
$this->filetime = 0;
$request = $this->getRequest();
$start = $request->getParam('start', false);

View File

@ -19,7 +19,7 @@ $(document).ready(function(){
ConsoDetails = $('input[name=ConsoDetails]').prop('checked') ? 1 : 0;
ConsoMois = $('select[name=ConsoMois]').val();
checkFile();
holdTheInterval = setInterval(checkFile, 4000);
holdTheInterval = setInterval(checkFile, 8000);
});
function checkFile() {

View File

@ -11,7 +11,7 @@ $(document).ready(function(){
postUrl = $(this).attr('href');
source = $('select[name=source]').val();
checkFile();
holdTheInterval = setInterval(checkFile, 4000);
holdTheInterval = setInterval(checkFile, 5000);
});
function checkFile() {