fix: [UI] Correct attaching cache timestamp to server

pull/7949/head
Jakub Onderka 2021-11-10 18:35:47 +01:00
parent 996173862b
commit 4dfa8e1a4a
1 changed files with 2 additions and 2 deletions

View File

@ -4241,7 +4241,7 @@ class Server extends AppModel
$job->saveProgress($jobId, 'Server ' . $server['Server']['id'] . ': ' . ((($i -1) * $chunk_size) + count($data)) . ' attributes cached.');
}
}
$redis->set('misp:server_cache_timestamp:' . $server['Server']['id'], time());
$redis->set('misp:server_cache_timestamp:' . $serverId, time());
return true;
}
@ -4261,7 +4261,7 @@ class Server extends AppModel
}
$results = $redis->exec();
foreach ($servers as $k => $v) {
$data[$k]['Server']['cache_timestamp'] = $results[$k];
$servers[$k]['Server']['cache_timestamp'] = $results[$k];
}
return $servers;
}