Remove the `do_listen` parameter
authorDavid E. Wheeler <david@justatheory.com>
Fri, 26 Oct 2012 16:24:11 +0000 (09:24 -0700)
committerDavid E. Wheeler <david@justatheory.com>
Fri, 26 Oct 2012 16:24:11 +0000 (09:24 -0700)
Per discussion. It was just an alias for `ping`.

Bucardo.pm
bucardo
bucardo.schema

index c5310fe45b07b3cbade357df5bacc6f22891a2ba..95eb4a3cfb5e5b9350cb7dbe9c2c420c0fa32629 100644 (file)
@@ -982,7 +982,7 @@ sub mcp_main {
                     $maindbh->commit();
 
                     ## Only certain things can be changed "on the fly"
-                    for my $val (qw/checksecs stayalive do_listen deletemethod status ping
+                    for my $val (qw/checksecs stayalive deletemethod status ping
                                     analyze_after_copy vacuum_after_copy targetgroup targetdb
                                     onetimecopy lifetimesecs maxkicks rebuild_index/) {
                         $sync->{$syncname}{$val} = $self->{sync}{$syncname}{$val} = $info->{$val};
@@ -6068,7 +6068,7 @@ sub validate_sync {
     } ## end each goat
 
     ## If pinging, listen for a triggerkick on all source databases
-    if ($s->{ping} or $s->{do_listen}) {
+    if ($s->{ping}) {
         my $l = "kick_sync_$syncname";
         for my $dbname (sort keys %{ $self->{sdb} }) {
             $x = $self->{sdb}{$dbname};
@@ -6181,7 +6181,7 @@ sub deactivate_sync {
 
         $x->{dbh} ||= $self->connect_database($dbname);
         $x->{dbh}->commit();
-        if ($s->{ping} or $s->{do_listen}) {
+        if ($s->{ping}) {
             my $l = "kick_sync_$syncname";
             $self->db_unlisten($x->{dbh}, $l, $dbname, 0);
             $x->{dbh}->commit();
diff --git a/bucardo b/bucardo
index 656431e6ef9717f16eac463fb2b1f080a0f209b5..c41e838c65e32896f7c40da4c6a2945ac7a713ac 100755 (executable)
--- a/bucardo
+++ b/bucardo
@@ -3861,7 +3861,6 @@ sub add_sync {
         stayalive                stayalive            TF               null
         kidsalive                kidsalive            TF               null
         ping                     ping                 TF               null
-        do_listen                do_listen            TF               null
         checktime                checktime            interval         null
         status                   status               =active|inactive null
         source_makedelta         source_makedelta     =inherits|on|off null
@@ -5207,7 +5206,7 @@ sub status_detail {
         }
 
         ## Should be 'yes' or 'no'
-        for (qw/analyze_after_copy vacuum_after_copy stayalive kidsalive ping do_listen/) {
+        for (qw/analyze_after_copy vacuum_after_copy stayalive kidsalive ping/) {
             $s->{$_} = (defined $s->{$_} and $s->{$_}) ? 'yes' : 'no ';
         }
 
@@ -6975,6 +6974,7 @@ sub upgrade {
         ['bucardo', 'sync', 'limitdbs'],
         ['bucardo', 'goat', 'customselect'],
         ['bucardo', 'sync', 'usecustomselect'],
+        ['bucardo', 'sync', 'do_listen'],
     );
 
     my @altered_columns = (
@@ -9758,10 +9758,6 @@ persisent. Defaults to false.
 Boolean indicating whether or not to ping each database before each sync.
 Optional.
 
-=item C<do_listen>
-
-XXX An alias for C<ping>?
-
 =item C<checktime>
 
 An interval specifying's the maximum time a sync should go before being
index 7e1cf754984f0f90b567604ef9d83467d7571d8f..032c402739f2fa49e32d4a265b3428c1ce098f6e 100644 (file)
@@ -393,7 +393,6 @@ CREATE TABLE bucardo.sync (
   copyextra          TEXT        NOT NULL DEFAULT '',  -- e.g. WITH OIDS
   deletemethod       TEXT        NOT NULL DEFAULT 'delete',
   ping               BOOLEAN     NOT NULL DEFAULT true,      -- Are we issuing NOTICES via triggers?
-  do_listen          BOOLEAN     NOT NULL DEFAULT false,     -- LISTEN for kicks on source/target database if ! ping
   checktime          INTERVAL        NULL,                   -- How often to check if we've not heard anything?
   status             TEXT        NOT NULL DEFAULT 'active',  -- Possibly CHECK / FK ('stopped','paused','b0rken')
   makedelta          BOOLEAN         NULL,