Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Hendrik Makait <hendrik.makait@gmail.com>
  • Loading branch information
fjetter and hendrikmakait authored Aug 20, 2024
1 parent 93f4c6f commit f7bbd44
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion distributed/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async def put(self, name=None, key=None, data=None, client=None, timeout=None):
while key not in self.scheduler.tasks:
await asyncio.sleep(0.01)
if deadline.expired:
raise TimeoutError(f"Task {key} unknown to scheudler.")
raise TimeoutError(f"Task {key} unknown to scheduler.")

record = {"type": "Future", "value": key}
self.future_refcount[name, key] += 1
Expand Down
2 changes: 1 addition & 1 deletion distributed/tests/test_queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,5 +341,5 @@ async def test_set_cancelled_future(c, s):
q = Queue("x")
# FIXME: This is a TimeoutError but pytest doesn't appear to recognize it as
# such
with pytest.raises(Exception, match="unknown to scheudler"):
with pytest.raises(Exception, match="unknown to scheduler"):
await q.put(x, timeout="100ms")
2 changes: 1 addition & 1 deletion distributed/variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def set(self, name=None, key=None, data=None, client=None, timeout=None):
while key not in self.scheduler.tasks:
await asyncio.sleep(0.01)
if deadline.expired:
raise TimeoutError(f"Task {key} unknown to scheudler.")
raise TimeoutError(f"Task {key} unknown to scheduler.")
self.scheduler.client_desires_keys(keys=[key], client="variable-%s" % name)
else:
record = {"type": "msgpack", "value": data}
Expand Down

0 comments on commit f7bbd44

Please sign in to comment.