MCPcopy
hub / github.com/eudicots/Cactus / progress

Method progress

cactus/deployment/engine.py:74–84  ·  view source on GitHub ↗

Progress of upload in percentage

(self)

Source from the content-addressed store, hash-verified

72 return sum([f.total_bytes_uploaded for f in self.files()])
73
74 def progress(self):
75 """
76 Progress of upload in percentage
77 """
78 total_bytes = float(self.total_bytes())
79 total_bytes_uploaded = float(self.total_bytes_uploaded())
80
81 if total_bytes == 0 or total_bytes_uploaded == 0:
82 return 0.0
83
84 return total_bytes_uploaded / total_bytes
85
86
87 def get_connection(self):

Callers 2

uploadMethod · 0.80
progressCallbackMethod · 0.80

Calls 2

total_bytesMethod · 0.95
total_bytes_uploadedMethod · 0.95

Tested by

no test coverage detected