Revision 37264
Added by Eri Katsari about 9 years ago
refreshCharts.php | ||
---|---|---|
48 | 48 |
//TODO REFRESH CHARTS AND DATA |
49 | 49 |
|
50 | 50 |
for($x=0;$x<count($keys);$x++) { |
51 |
//$this->log->info("Looking up for key: ".$keys[$x]);
|
|
51 |
$this->log->info("Looking up for key: ".$keys[$x]); |
|
52 | 52 |
|
53 | 53 |
if ((strpos($keys[$x],'chart')===false)&&(strpos($keys[$x],'table')===false)&&(strpos($keys[$x],'STATS')===false)) |
54 | 54 |
{ |
... | ... | |
58 | 58 |
$query = $this->cache->hget($keys[$x],'query'); |
59 | 59 |
$persistent= $this->cache->hget($keys[$x],'persistent'); |
60 | 60 |
if(($query!=null)&&($persistent)) |
61 |
{ $this->log->info("going to recalculate the results for key ".$keys[$x] );
|
|
61 |
{ $this->log->info("going to recalculate the results for query ".$query );
|
|
62 | 62 |
$fetchMode = $this->cache->hget($keys[$x], 'fetchMode'); |
63 | 63 |
if($fetchMode==null) |
64 | 64 |
{ $fetchMode=3; } |
... | ... | |
71 | 71 |
if(json_encode($shadowResults)) |
72 | 72 |
{$shadowResults=json_encode($shadowResults);} |
73 | 73 |
$this->cache->hmset($keys[$x],array("results" => $result, "query" =>$query,"persistent" => $persistent,"shadow" => $shadowResults, "fetchMode" => $fetchMode, "backup" => $backup)); |
74 |
//$this->log->info("Stored Entry : ");
|
|
75 |
//$this->log->info("Shadow ".$this->cache->hget($keys[$x],'shadow'));
|
|
74 |
$this->log->info("Stored Entry : "); |
|
75 |
$this->log->info("Shadow ".$this->cache->hget($keys[$x],'shadow')); |
|
76 | 76 |
} |
77 | 77 |
else{ |
78 | 78 |
|
... | ... | |
90 | 90 |
|
91 | 91 |
else |
92 | 92 |
{ |
93 |
//$this->log->info("Ignoring chart key: ".$keys[$x]);
|
|
93 |
$this->log->info("Ignoring chart key: ".$keys[$x]); |
|
94 | 94 |
|
95 | 95 |
} |
96 | 96 |
|
Also available in: Unified diff
Added Persistent flag for queries; added cache clean up after migrate