Buckets:

download
raw
923 Bytes
from startup_events import ServiceStarted, ServiceFailed
class StartupUI:
def __init__(self, queue, total):
self.queue = queue
self.total = total
self.started = 0
self.done = False
def run(self):
while not self.done:
event = self.queue.get()
if isinstance(event, ServiceStarted):
self.started += 1
self._print_done(event.service, event.detail)
if self.started == self.total:
self.done = True
elif isinstance(event, ServiceFailed):
self._print_fail(event.service, event.error)
self.done = True
def _print_done(self, name, detail):
msg = f"✔ {name} started"
if detail:
msg += f" ({detail})"
print(msg)
def _print_fail(self, service, error):
print(f"✖ {service} failed: {error}")

Xet Storage Details

Size:
923 Bytes
·
Xet hash:
e082dff9fb22726d37148d9b2356dcdf9d96bce97f61091d9b4f73ac5e1ee0c7

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.