Commit ed3afb88 authored by Georgi Mateev's avatar Georgi Mateev
Browse files

[BUGFIX] 1643 Moved the batch size to a constant

parent 929724b4
...@@ -69,6 +69,8 @@ class BackendService { ...@@ -69,6 +69,8 @@ class BackendService {
const BACKEND_MODE_QUEUE_CONTROLLER = 'Queue'; const BACKEND_MODE_QUEUE_CONTROLLER = 'Queue';
const BACKEND_MODE_QUEUE_NEWSLETTER = 'Newsletter'; const BACKEND_MODE_QUEUE_NEWSLETTER = 'Newsletter';
const CSV_EXPORT_BATCH_SIZE = 10000;
/** /**
* Get all pages the be user has access to * Get all pages the be user has access to
* *
...@@ -396,12 +398,12 @@ class BackendService { ...@@ -396,12 +398,12 @@ class BackendService {
'password', 'starttime', 'endtime', 'deleted', 'sent', 'priority', 'crdate', 'cruser_id', 'hidden']; 'password', 'starttime', 'endtime', 'deleted', 'sent', 'priority', 'crdate', 'cruser_id', 'hidden'];
$dateFields = ['tstamp', 'starttime', 'endtime', 'crdate']; $dateFields = ['tstamp', 'starttime', 'endtime', 'crdate'];
$doctrineQuery = $mailRepository->getDoctrineQueryForFindAllEntries($pageUid, 20000, $filters); $doctrineQuery = $mailRepository->getDoctrineQueryForFindAllEntries($pageUid, 0, $filters);
$doctrineQuery->count('*'); $doctrineQuery->count('*');
$totalRows = $doctrineQuery->execute()->fetchColumn(0); $totalRows = $doctrineQuery->execute()->fetchColumn(0);
$doctrineQuery->select('*'); $doctrineQuery->select('*');
$batchSize = 10000; $batchSize = self::CSV_EXPORT_BATCH_SIZE;
$offset = 0; $offset = 0;
$first = TRUE; $first = TRUE;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment