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

Method _start

wal_e/worker/upload_pool.py:29–40  ·  view source on GitHub ↗

Start upload and accout for resource consumption.

(self, tpart)

Source from the content-addressed store, hash-verified

27 self.concurrency_burden = 0
28
29 def _start(self, tpart):
30 """Start upload and accout for resource consumption."""
31 g = gevent.Greenlet(self.uploader, tpart)
32 g.link(self._finish)
33
34 # Account for concurrency_burden before starting the greenlet
35 # to avoid racing against .join.
36 self.concurrency_burden += 1
37
38 self.member_burden += len(tpart)
39
40 g.start()
41
42 def _finish(self, g):
43 """Called on completion of an upload greenlet.

Callers 1

putMethod · 0.95

Calls 1

startMethod · 0.45

Tested by

no test coverage detected