Changeset 249cc4066ac63ea5858d5c1e1644865d158ed6a4

Show
Ignore:
Timestamp:
11/29/11 22:10:08 (2 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1322604608 -0500
git-parent:

[8e9cf57ebf8fd9d4375a893d47cef1aaecce0662]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1322604608 -0500
Message:

add a notify_only option to feeds that makes noit configs blank (just as a notification that a change occurred)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_conf.c

    r8e9cf57 r249cc40  
    12521252  xmlCharEncodingHandlerPtr enc; 
    12531253  struct config_line_vstr *clv; 
     1254  noit_boolean notify_only = noit_false; 
     1255  const char *v; 
    12541256  SETUP_LOG(config, return -1); 
     1257  v = noit_log_stream_get_property(config_log, "notify_only"); 
     1258  if(v && !strcmp(v, "on")) notify_only = noit_true; 
    12551259 
    12561260  /* We know we haven't changed */ 
    12571261  if(last_write_gen == __config_gen) return 0; 
    1258  
    12591262  gettimeofday(&__now, NULL); 
     1263 
     1264  if(notify_only) { 
     1265    noitL(config_log, "n\t%lu.%03lu\t%d\t\n", 
     1266          (unsigned long int)__now.tv_sec, 
     1267          (unsigned long int)__now.tv_usec / 1000UL, 0); 
     1268    last_write_gen = __config_gen; 
     1269    return 0; 
     1270  } 
     1271 
    12601272  clv = calloc(1, sizeof(*clv)); 
    12611273  clv->target = CONFIG_B64;