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

Method running_size

wal_e/worker/prefetch.py:175–187  ·  view source on GitHub ↗
(self, segment)

Source from the content-addressed store, hash-verified

173 return path.isdir(self.seg_dir(segment))
174
175 def running_size(self, segment):
176 byts = 0
177 try:
178 sd = self.seg_dir(segment)
179 for s in os.listdir(sd):
180 byts += path.getsize(path.join(sd, s))
181
182 return byts
183 except EnvironmentError as e:
184 if e.errno == errno.ENOENT:
185 return byts
186
187 raise
188
189 def promote(self, segment, destination):
190 source = path.join(self.prefetched_dir, segment.name)

Callers 3

wal_restoreMethod · 0.95
test_atomic_downloadFunction · 0.80
test_running_size_errorFunction · 0.80

Calls 2

seg_dirMethod · 0.95
joinMethod · 0.45

Tested by 2

test_atomic_downloadFunction · 0.64
test_running_size_errorFunction · 0.64