I just built a logic hook that makes ZuckerReports' java reports run against a replicated copy of the DB, thus freeing up resources on the live DB.
I figured this is worth sharing!
- Add a parameter 'report_host_name' to sugar_config in config_override.php
- Create an after_retrieve logic hook on the ZuckerReportTemplate module with this in it.
PHP Code:
if (isset($sugar_config['report_host_name']))
{
$sugar_config['dbconfig']['db_host_name'] = $sugar_config['report_host_name'];
}
By the time Zucker reads the config and build the java cmd file it reads the modified config and points the java at the replication slave!
Bookmarks