Skip to content
Snippets Groups Projects
Commit e06b59c8 authored by Marius Burkard's avatar Marius Burkard
Browse files

- fixed some things from previous commits

parent e6c83e73
No related branches found
No related tags found
No related merge requests found
...@@ -92,14 +92,16 @@ class cronjob_monitor_database_size extends cronjob { ...@@ -92,14 +92,16 @@ class cronjob_monitor_database_size extends cronjob {
$data[$i]['sys_groupid'] = $rec['sys_groupid']; $data[$i]['sys_groupid'] = $rec['sys_groupid'];
$quota = $rec['database_quota'] * 1024 * 1024; $quota = $rec['database_quota'] * 1024 * 1024;
if (!is_numeric($quota)) continue; if(!is_numeric($quota)) continue;
if($quota < 0 || $quota > $data[$i]['size']) { if($quota < 1 || $quota > $data[$i]['size']) {
print $rec['database_name'] . ' does not exceed quota qize: ' . $quota . ' > ' . $data[$i]['size'] . "\n";
if($rec['quota_exceeded'] == 'y') { if($rec['quota_exceeded'] == 'y') {
$app->dbmaster->datalogUpdate('web_database', array('quota_exceeded' => 'n'), 'database_id', $rec['database_id']); $app->dbmaster->datalogUpdate('web_database', array('quota_exceeded' => 'n'), 'database_id', $rec['database_id']);
} }
} elseif($rec['quota_exceeded'] == 'n') { } elseif($rec['quota_exceeded'] == 'n') {
$app->dbmaster->datalogUpdate('web_database', array('quota_exceeded' => 'y'), 'database_id', $rec['database_id']); print $rec['database_name'] . ' exceeds quota qize: ' . $quota . ' < ' . $data[$i]['size'] . "\n";
$app->dbmaster->datalogUpdate('web_database', array('quota_exceeded' => 'y'), 'database_id', $rec['database_id']);
} }
} }
......
  • Daniel @X-Coder ·

    Were the print-lines in line 98 and 103 added on purpose in this commit? -My cron.log is spammed with it.

  • Author Owner

    I guess we can remove them before 3.2 release.

  • Daniel @X-Coder ·

    Thanks. Or maybe only output when loglevel is DEBUG.

  • Marius Burkard @pixcept

    mentioned in issue #5755 (closed)

    ·

    mentioned in issue #5755 (closed)

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment