@@ -58,8 +58,7 @@ def mark_dead(self, connection):
58
58
if self .sniff_on_connection_fail :
59
59
self .initiate_sniff ()
60
60
61
- @asyncio .coroutine
62
- def _get_sniff_data (self , initial = False ):
61
+ async def _get_sniff_data (self , initial = False ):
63
62
previous_sniff = self .last_sniff
64
63
65
64
# reset last_sniff timestamp
@@ -102,8 +101,7 @@ def _get_sniff_data(self, initial=False):
102
101
for t in chain (done , tasks ):
103
102
t .cancel ()
104
103
105
- @asyncio .coroutine
106
- def sniff_hosts (self , initial = False ):
104
+ async def sniff_hosts (self , initial = False ):
107
105
"""
108
106
Obtain a list of nodes from the cluster and create a new connection
109
107
pool using the information retrieved.
@@ -130,8 +128,7 @@ def sniff_hosts(self, initial=False):
130
128
if c not in self .connection_pool .connections :
131
129
yield from c .close ()
132
130
133
- @asyncio .coroutine
134
- def main_loop (self , method , url , params , body , ignore = (), timeout = None ):
131
+ async def main_loop (self , method , url , params , body , ignore = (), timeout = None ):
135
132
for attempt in range (self .max_retries + 1 ):
136
133
connection = self .get_connection ()
137
134
0 commit comments