fix: Added progress bar to JSON cache generation

pull/1398/head
Iglocska 2016-07-30 19:00:02 +02:00
parent 47c6feab4d
commit 37c9abfb7c
1 changed files with 1 additions and 0 deletions

View File

@ -90,6 +90,7 @@ class EventShell extends AppShell
$result = $this->Event->fetchEvent($user, array('eventid' => $eventId['Event']['id'], 'includeAttachments' => Configure::read('MISP.cached_attachments')));
$file->append($converter->event2JSON($result[0]));
if ($k < count($eventIds) -1 ) $file->append(',');
$this->Job->saveField('progress', ($k+1) / $eventCount *100);
}
$file->append(']}');
$file->close();