MCPcopy
hub / github.com/eth0izzle/bucket-stream / get

Method get

bucket-stream.py:121–133  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

119 super().put(bucket_url)
120
121 def get(self):
122 global THREAD_EVENT
123 with self.lock:
124 t = time.monotonic()
125 if self.rate_limited and t < self.next_yield:
126 cprint("You have hit the AWS rate limit - slowing down... (tip: enter credentials in config.yaml)", "yellow")
127 THREAD_EVENT.wait(self.next_yield - t)
128 t = time.monotonic()
129 self.rate_limited = False
130
131 self.next_yield = t + RATE_LIMIT_SLEEP
132
133 return super().get()
134
135
136class BucketWorker(Thread):

Callers 1

runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected