Skip empty cache files
This commit is contained in:
parent
c8d2cf77ce
commit
3eae2f73c7
@ -164,7 +164,7 @@ function aggregate_all($period)
|
|||||||
$data = null;
|
$data = null;
|
||||||
foreach (PROTOCOLS as $protocol) {
|
foreach (PROTOCOLS as $protocol) {
|
||||||
$cache_file = "$CACHE_DIR/$protocol/$date_string.json";
|
$cache_file = "$CACHE_DIR/$protocol/$date_string.json";
|
||||||
if (!file_exists($cache_file)) continue;
|
if (!file_exists($cache_file) or !filesize($cache_file)) continue;
|
||||||
|
|
||||||
error_log("[$date_string] [$protocol] load cache");
|
error_log("[$date_string] [$protocol] load cache");
|
||||||
$data_new = json_decode(file_get_contents($cache_file), true);
|
$data_new = json_decode(file_get_contents($cache_file), true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user