From: arjen Date: Sat, 17 Nov 2007 09:34:07 +0000 (+0000) Subject: Cleaned up some leftovers X-Git-Tag: V0_0_11~11 X-Git-Url: http://www.andromeda.nl/gitweb/?p=gnucomo.git;a=commitdiff_plain;h=d04c1326f90988d766d8169a49eec8e95a2744f6 Cleaned up some leftovers --- diff --git a/src/gcm_daemon/classes/gnucomo_db_version.php b/src/gcm_daemon/classes/gnucomo_db_version.php index 9bb9024..fb834d8 100644 --- a/src/gcm_daemon/classes/gnucomo_db_version.php +++ b/src/gcm_daemon/classes/gnucomo_db_version.php @@ -14,8 +14,8 @@ { case 1: //DROP the rule that prohibits updates (change of spec). - //$local_sql = "DROP RULE log_update"; - //$dbms->query($local_sql); //DISABLED FOR NEW ROLE LOG-tABLE ??? + $local_sql = "DROP RULE log_update ON log"; + $dbms->query($local_sql); //DISABLED FOR NEW ROLE LOG-tABLE ??? case 2: //In the log table processed should be false by default @@ -663,13 +663,13 @@ case 43: $local_sql .= " VALUES ('filesystem', 'Ifree', 'Number of i-nodes available', 'DYNAMIC', 1000, 1000000, 't')"; $dbms->query($local_sql); -//These columns have to be removed when a new version of PGSQL has become mainstream that supportsa DROP COLUMN /* TODO: GRANT UPDATE ON action_user_actionstepid_seq TO GROUP ops, GROUP admin; */ +//These columns have to be removed when a new version of PGSQL has become mainstream that supportsa DROP COLUMN /* $local_sql = "ALTER TABLE log DROP COLUMN recognized"; diff --git a/src/gcm_daemon/gcm_daemon.php b/src/gcm_daemon/gcm_daemon.php index bf8eded..4002999 100755 --- a/src/gcm_daemon/gcm_daemon.php +++ b/src/gcm_daemon/gcm_daemon.php @@ -20,7 +20,10 @@ Gnucomo-0.0.8: September 4th 2003 $Log: gcm_daemon.php,v $ - Revision 1.23 2007-11-03 10:31:12 arjen + Revision 1.24 2007-11-17 09:34:07 arjen + Cleaned up some leftovers + + Revision 1.23 2007/11/03 10:31:12 arjen Added the class definition for a filesystem parameter. New issue type: 'property out of range'. @@ -81,12 +84,12 @@ */ -// $Id: gcm_daemon.php,v 1.23 2007-11-03 10:31:12 arjen Exp $ +// $Id: gcm_daemon.php,v 1.24 2007-11-17 09:34:07 arjen Exp $ ini_set('include_path', '.:./classes:../phpclasses'); ini_set('html_errors', 'false'); -define("BATCHSIZE", 5000); +define("BATCHSIZE", 10000); //Tell the log that we're up. define_syslog_variables(); @@ -194,9 +197,8 @@ else die ("Couldn't initialize database version.\n"); } -// If there is a new gcm_daemon_version the logrecords that couldn't be -// understood can be reprocessed. For this reason processed is now changed -// to false again for not recognized records. +// The gcm_daemon version is maintained in the database to enable +// automatic update actions. $local_sql = "SELECT setting_value FROM db_value WHERE setting = 'gcm_daemon_version'"; @@ -206,11 +208,6 @@ if ($dbms->fetch_row() == "TRUE") { if ($dbms->db_result_row[0] < $gcmd_version) { - //Reactive log-records that weren't understood earlier. - - $local_sql = "UPDATE log SET processed = false - WHERE logid NOT IN (SELECT DISTINCT logid FROM log_adv)"; - $dbms->query($local_sql); //Update de gcm_daemon version in the database $local_sql = "UPDATE db_value SET setting_value = '".$gcmd_version;