MCPcopy Create free account
hub / github.com/wal-e/wal-e / join

Method join

wal_e/worker/pg/wal_transfer.py:130–144  ·  view source on GitHub ↗

Wait for transfer to exit, raising errors as necessary.

(self)

Source from the content-addressed store, hash-verified

128 self.greenlets = set([])
129
130 def join(self):
131 """Wait for transfer to exit, raising errors as necessary."""
132 self.closed = True
133
134 while self.expect > 0:
135 val = self.wait_change.get()
136 self.expect -= 1
137
138 if val is not None:
139 # Wait a while for all running greenlets to exit, and
140 # then attempt to force them to exit so join()
141 # terminates in a reasonable amount of time.
142 gevent.joinall(list(self.greenlets), timeout=30)
143 gevent.killall(list(self.greenlets), block=True, timeout=30)
144 raise val
145
146 def start(self, segment):
147 """Begin transfer for an indicated wal segment."""

Callers 14

wal_archiveMethod · 0.95
test_simple_uploadFunction · 0.95
test_multi_uploadFunction · 0.95
test_simple_failFunction · 0.95
test_multi_explicit_failFunction · 0.95
test_multi_pipeline_failFunction · 0.95
test_finally_executionFunction · 0.95
test_start_after_joinFunction · 0.95
test_mark_done_faultFunction · 0.95
mark_doneMethod · 0.45
future_segment_streamMethod · 0.45

Calls 1

getMethod · 0.80

Tested by 8

test_simple_uploadFunction · 0.76
test_multi_uploadFunction · 0.76
test_simple_failFunction · 0.76
test_multi_explicit_failFunction · 0.76
test_multi_pipeline_failFunction · 0.76
test_finally_executionFunction · 0.76
test_start_after_joinFunction · 0.76
test_mark_done_faultFunction · 0.76