Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tchaton committed Jun 18, 2024
1 parent 04ded6f commit 41cefd9
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/lightning/app/core/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ def batch_get(self, timeout: Optional[float] = None, count: Optional[int] = None

@backoff.on_exception(backoff.expo, (RuntimeError, requests.exceptions.HTTPError))
def put(self, item: Any) -> None:
t0 = time.time()
if not self.app_id:
raise ValueError(f"The Lightning App ID couldn't be extracted from the queue name: {self.name}")

Expand All @@ -533,14 +532,10 @@ def put(self, item: Any) -> None:
f"The Queue {self._name_suffix} length is larger than the recommended length of {WARNING_QUEUE_SIZE}. "
f"Found {queue_len}. This might cause your application to crash, please investigate this."
)
print("AAA", time.time() - t0)
resp = self.client.post(f"v1/{self.app_id}/{self._name_suffix}", data=value, query_params={"action": "push"})
print("BBB", time.time() - t0)
if resp.status_code != 201:
raise RuntimeError(f"Failed to push to queue: {self._name_suffix}")

print("CCC", time.time() - t0)

def length(self) -> int:
if not self.app_id:
raise ValueError(f"App ID couldn't be extracted from the queue name: {self.name}")
Expand Down

0 comments on commit 41cefd9

Please sign in to comment.