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

Method start

wal_e/worker/pg/wal_transfer.py:146–162  ·  view source on GitHub ↗

Begin transfer for an indicated wal segment.

(self, segment)

Source from the content-addressed store, hash-verified

144 raise val
145
146 def start(self, segment):
147 """Begin transfer for an indicated wal segment."""
148
149 if self.closed:
150 raise UserCritical(msg='attempt to transfer wal after closing',
151 hint='report a bug')
152
153 g = gevent.Greenlet(self.transferer, segment)
154 g.link(self._complete_execution)
155 self.greenlets.add(g)
156
157 # Increment .expect before starting the greenlet, or else a
158 # very unlucky .join could be fooled as to when pool is
159 # complete.
160 self.expect += 1
161
162 g.start()
163
164 def _complete_execution(self, g):
165 """Forward any raised exceptions across a channel."""

Callers 10

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
_startMethod · 0.45

Calls 2

UserCriticalClass · 0.90
addMethod · 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