Skip to content
This repository has been archived by the owner on Nov 18, 2017. It is now read-only.

Make governor.py more verbose #11

Open
tvb opened this issue May 15, 2015 · 1 comment
Open

Make governor.py more verbose #11

tvb opened this issue May 15, 2015 · 1 comment

Comments

@tvb
Copy link

tvb commented May 15, 2015

I think it is better to make governor.py more verbose so the current status of governor.py is visible. Something like so:

     if etcd.race("/initialize", postgresql.name):
         logging.info("initializing")
         postgresql.initialize()
         etcd.take_leader(postgresql.name)
         postgresql.start()
     else:
         logging.info("else")
         synced_from_leader = False
         while not synced_from_leader:
             logging.info("waiting for sync")
             leader = etcd.current_leader()
             if not leader:
                 logging.info("i'm not a leader, sleeping")
                 time.sleep(5)
                 continue
             if postgresql.sync_from_leader(leader):
                 logging.info("syncing from leader")
                 postgresql.write_recovery_conf(leader)
                 postgresql.start()
                 synced_from_leader = True
             else:
                 logging.info("else sleeping")
                 time.sleep(5)
@tvb tvb changed the title add more logging Make governor.py more verbose May 15, 2015
@miketonks
Copy link

I added a pull request for this: #21

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants