Commit cf4a91ad authored by Richard Mansfield's avatar Richard Mansfield
Browse files

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



Change-Id: Iba00fe5365dda412270f59e6c51dbb152f5223b4
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent cc1f4657
......@@ -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