Skip to content
Snippets Groups Projects
Commit aa9ab3d9 authored by Jared Hancock's avatar Jared Hancock
Browse files

export: Pre-fetch staff objects

This is required because using unbuffered MySQL queries means that no other
SQL queries can be run until the export is finished. Since the Staff model
will lazily query the config table, the queries need to be fetched in
advance.
parent 8ab4432f
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,11 @@ class Export {
->aggregate(array('count' => SqlAggregate::COUNT('entries__id'))),
));
// Fetch staff information
// FIXME: Adjust Staff model so it doesn't do extra queries
foreach (Staff::objects() as $S)
$S->get('junk');
return self::dumpQuery($tickets,
array(
'number' => __('Ticket Number'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment