public function RadioactivityRedisIncidentStorage::processIncidents in Radioactivity 7.2
Process incidents in the deferred queue
Overrides RadioactivityIncidentStorage::processIncidents
File
- includes/
RadioactivityRedisIncidentStorage.inc, line 46 - Memcached incident storage class
Class
- RadioactivityRedisIncidentStorage
- @file Memcached incident storage class
Code
public function processIncidents() {
$rc = $this
->connect();
if (!$rc) {
return;
}
$i = 0;
// get and reset top
$to = $rc
->get("radioactivity_top");
$rc
->set("radioactivity_top", 0);
if (!$to) {
$to = 0;
}
while ($i < $to) {
$incident = unserialize($rc
->get("radioactivity_incident_" . $i));
if ($incident && $incident
->floodCheck()) {
$incident
->updateEnergy();
}
$i++;
}
}