Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alm0ra committed Feb 17, 2024
1 parent fdd459c commit b34f9bb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions aiokafka/consumer/subscription_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import copy
import logging
import time
from asyncio import Event, shield
from enum import Enum
from typing import (
Awaitable,
Expand Down Expand Up @@ -428,7 +427,7 @@ def __init__(self, topic_partitions: Iterable[TopicPartition]) -> None:
self._tp_state[tp] = TopicPartitionState(self)

self.unassign_future: asyncio.Future[T] = create_future()
self.commit_refresh_needed = Event()
self.commit_refresh_needed = asyncio.Event()

@property
def tps(self) -> Iterable[TopicPartition]:
Expand Down Expand Up @@ -581,7 +580,7 @@ def seek(self, position: int) -> None:
self._position_fut.set_result(None)

def wait_for_position(self) -> Awaitable[T]:
return shield(self._position_fut)
return asyncio.shield(self._position_fut)

# Pause/Unpause
def pause(self) -> None:
Expand Down

0 comments on commit b34f9bb

Please sign in to comment.