From 94331fde6dbb94159bcb2f0585129745f4f2345d Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Wed, 13 Apr 2016 10:57:28 +0200 Subject: [PATCH] Do not try to fetch xlog_location when async_executor is busy --- patroni/ha.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patroni/ha.py b/patroni/ha.py index 21999304..7cdecd02 100644 --- a/patroni/ha.py +++ b/patroni/ha.py @@ -59,7 +59,7 @@ class Ha(object): } if self.patroni.tags: data['tags'] = self.patroni.tags - if data['state'] in ['running', 'restarting', 'starting']: + if not self._async_executor.busy and data['state'] in ['running', 'restarting', 'starting']: try: data['xlog_location'] = self.state_handler.xlog_position() except: