Changeset View
Changeset View
Standalone View
Standalone View
swh/loader/core/loader.py
Show First 20 Lines • Show All 370 Lines • ▼ Show 20 Lines | def load(self) -> Dict[str, str]: | ||||
}, | }, | ||||
}, | }, | ||||
) | ) | ||||
total_time_fetch_data = 0.0 | total_time_fetch_data = 0.0 | ||||
total_time_process_data = 0.0 | total_time_process_data = 0.0 | ||||
total_time_store_data = 0.0 | total_time_store_data = 0.0 | ||||
try: | |||||
# Initially not a success, will be True when actually one | # Initially not a success, will be True when actually one | ||||
status = "failed" | |||||
success = False | success = False | ||||
try: | |||||
with self.statsd_timed("prepare"): | with self.statsd_timed("prepare"): | ||||
self.prepare() | self.prepare() | ||||
while True: | while True: | ||||
t1 = time.monotonic() | t1 = time.monotonic() | ||||
more_data_to_fetch = self.fetch_data() | more_data_to_fetch = self.fetch_data() | ||||
t2 = time.monotonic() | t2 = time.monotonic() | ||||
total_time_fetch_data += t2 - t1 | total_time_fetch_data += t2 - t1 | ||||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |