Do not try to fetch xlog_location when async_executor is busy

This commit is contained in:
Alexander Kukushkin
2016-04-13 13:32:39 +02:00
parent ff41818a84
commit 94331fde6d
+1 -1
View File
@@ -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: