Cleaned up some leftovers
authorarjen <arjen>
Sat, 17 Nov 2007 09:34:07 +0000 (09:34 +0000)
committerarjen <arjen>
Sat, 17 Nov 2007 09:34:07 +0000 (09:34 +0000)
src/gcm_daemon/classes/gnucomo_db_version.php
src/gcm_daemon/gcm_daemon.php

index 9bb9024..fb834d8 100644 (file)
@@ -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";
index bf8eded..4002999 100755 (executable)
    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'.
 
 
 */
 
-// $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;