[Reconnoiter-devel] [reconnoiter commit] r1063 - docs/executable trunk/src

svn-commit at lists.omniti.com svn-commit at lists.omniti.com
Mon Nov 2 22:27:05 EST 2009


Author: jesus
Date: 2009-11-02 22:27:05 -0500 (Mon, 02 Nov 2009)
New Revision: 1063

Modified:
   docs/executable/stratcond.xml
   trunk/src/stratcond.c
Log:
fixes #207

Modified: docs/executable/stratcond.xml
===================================================================
--- docs/executable/stratcond.xml	2009-11-03 03:01:15 UTC (rev 1062)
+++ docs/executable/stratcond.xml	2009-11-03 03:27:05 UTC (rev 1063)
@@ -29,6 +29,7 @@
       <arg choice="opt">-t <replaceable>path</replaceable></arg>
       <arg choice="opt">-d</arg>
       <arg choice="opt">-D</arg>
+      <arg choice="opt">-s</arg>
       <arg choice="opt">-h</arg>
     </cmdsynopsis>
   </refsynopsisdiv>
@@ -93,6 +94,14 @@
       </para>
     </listitem>
   </varlistentry>
+  <varlistentry><term><option>-s</option></term>
+    <listitem>
+      <para>
+        Disables pulling for durable logs from noits and subsequent
+        loading of data into the database.
+      </para>
+    </listitem>
+  </varlistentry>
   <varlistentry><term><option>-h</option></term>
     <listitem>
       <para>

Modified: trunk/src/stratcond.c
===================================================================
--- trunk/src/stratcond.c	2009-11-03 03:01:15 UTC (rev 1062)
+++ trunk/src/stratcond.c	2009-11-03 03:27:05 UTC (rev 1063)
@@ -62,6 +62,7 @@
 static const char *chrootpath = NULL;
 static int foreground = 0;
 static int debug = 0;
+static int no_store = 0;
 
 #include "man/stratcond.usage.h"
 static void usage(const char *progname) {
@@ -78,8 +79,11 @@
 
 void parse_clargs(int argc, char **argv) {
   int c;
-  while((c = getopt(argc, argv, "hc:dDu:g:t:")) != EOF) {
+  while((c = getopt(argc, argv, "shc:dDu:g:t:")) != EOF) {
     switch(c) {
+      case 's':
+        no_store = 1;
+        break;
       case 'h':
         usage(argv[0]);
         exit(1);
@@ -200,11 +204,15 @@
   }
 
   stratcon_iep_init();
-  stratcon_jlog_streamer_init(APPNAME);
+  if(!no_store) {
+    stratcon_jlog_streamer_init(APPNAME);
+    /* Write our log out, and setup a watchdog to write it out on change. */
+    stratcon_datastore_saveconfig(NULL);
+    noit_conf_coalesce_changes(10); /* 10 seconds of no changes before we write */
+  }
+  else
+    noit_conf_coalesce_changes(INT_MAX);
 
-  /* Write our log out, and setup a watchdog to write it out on change. */
-  stratcon_datastore_saveconfig(NULL);
-  noit_conf_coalesce_changes(10); /* 10 seconds of no changes before we write */
   noit_conf_watch_and_journal_watchdog(stratcon_datastore_saveconfig, NULL);
 
   eventer_loop();



More information about the Reconnoiter-devel mailing list