diff options
Diffstat (limited to 'geo-replication/syncdaemon/gsyncdstatus.py')
-rw-r--r-- | geo-replication/syncdaemon/gsyncdstatus.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/gsyncdstatus.py b/geo-replication/syncdaemon/gsyncdstatus.py index f0836edbb26..c9938b5116f 100644 --- a/geo-replication/syncdaemon/gsyncdstatus.py +++ b/geo-replication/syncdaemon/gsyncdstatus.py @@ -17,6 +17,8 @@ import json import time from datetime import datetime from errno import EACCES, EAGAIN, ENOENT +import logging + from syncdutils import EVENT_GEOREP_ACTIVE, EVENT_GEOREP_PASSIVE, gf_event from syncdutils import EVENT_GEOREP_CHECKPOINT_COMPLETED @@ -215,6 +217,10 @@ class GeorepStatus(object): data["checkpoint_time"] = checkpoint_time data["checkpoint_completion_time"] = curr_time data["checkpoint_completed"] = "Yes" + logging.info("Checkpoint completed. Checkpoint " + "Time: %s, Completion Time: %s" % ( + human_time_utc(checkpoint_time), + human_time_utc(curr_time))) self.trigger_gf_event_checkpoint_completion( checkpoint_time, curr_time) @@ -223,10 +229,12 @@ class GeorepStatus(object): self._update(merger) def set_worker_status(self, status): - self.set_field("worker_status", status) + if self.set_field("worker_status", status): + logging.info("Worker Status: %s" % status) def set_worker_crawl_status(self, status): - self.set_field("crawl_status", status) + if self.set_field("crawl_status", status): + logging.info("Crawl Status: %s" % status) def set_slave_node(self, slave_node): def merger(data): @@ -253,6 +261,7 @@ class GeorepStatus(object): def set_active(self): if self.set_field("worker_status", "Active"): + logging.info("Worker Status: Active") gf_event(EVENT_GEOREP_ACTIVE, master_volume=self.master, slave_host=self.slave_host, @@ -261,6 +270,7 @@ class GeorepStatus(object): def set_passive(self): if self.set_field("worker_status", "Passive"): + logging.info("Worker Status: Passive") gf_event(EVENT_GEOREP_PASSIVE, master_volume=self.master, slave_host=self.slave_host, |