function acsf_cron in Acquia Cloud Site Factory Connector 8.2
Same name and namespace in other branches
- 8 acsf.module \acsf_cron()
Implements hook_cron().
File
- ./
acsf.module, line 71 - Acquia Cloud Site Factory Connector.
Code
function acsf_cron() {
// Don't execute on non-ACSF systems, which cannot recognize the current site.
if (!empty($GLOBALS['gardens_site_settings']['conf']['acsf_site_id'])) {
// Periodically refresh the site data.
$site = AcsfSite::load();
$refresh_age = time() - 86400;
if ($site->last_sf_refresh < $refresh_age) {
$site
->refresh();
}
}
}