Commit 374074fe authored by Francois Marier's avatar Francois Marier Committed by Gerrit Code Review
Browse files

Merge "When logging daily stats info, get size of dataroot last (bug #759414)"

parents ec47424f cf4a91ad
......@@ -2506,18 +2506,6 @@ function cron_site_data_daily() {
$current = site_data_current();
$time = db_format_timestamp(time());
require_once('function.dirsize.php');
if ($diskusage = dirsize(get_config('dataroot'))) {
// Currently there is no need to track disk usage
// over time, so delete old records first.
delete_records('site_data', 'type', 'disk-usage');
insert_record('site_data', (object) array(
'ctime' => $time,
'type' => 'disk-usage',
'value' => $diskusage,
));
}
// Total users
insert_record('site_data', (object) array(
'ctime' => $time,
......@@ -2582,6 +2570,18 @@ function cron_site_data_daily() {
unlink($viewlog . '.temp');
}
require_once('function.dirsize.php');
if ($diskusage = dirsize(get_config('dataroot'))) {
// Currently there is no need to track disk usage
// over time, so delete old records first.
delete_records('site_data', 'type', 'disk-usage');
insert_record('site_data', (object) array(
'ctime' => $time,
'type' => 'disk-usage',
'value' => $diskusage,
));
}
graph_site_data_daily();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment