You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It seems that the queue_size and timeout parameters don't play nicely together. When they are used in tandem there seems to be some sort of implicit queuing that happens creating increasing delays in the node subscribing to messages.
To Reproduce
Here is a minimal example to reproduce:
from dora import Node
import pyarrow as pa
import time
def main() -> None:
dora_node = Node()
i = 0
while True:
dora_node.send_output("ts", pa.array([time.perf_counter_ns()]))
i+= 1
print(f"Sent {i} times", flush=True)
time.sleep(0.001)
if __name__ == "__main__":
main()
time_subscriber.py
from dora import Node
import time
def main() -> None:
dora_node = Node()
i = 0
while True:
message = dora_node.next(timeout=0.001)
if message is None:
break
if message["type"] != "INPUT":
continue
sent = message["value"][0].as_py() // 1000
received = time.perf_counter_ns() // 1000
i += 1
print(f"[{i}] Sent: {sent}, Received: {received}, Difference: {received - sent}")
time.sleep(0.1)
if __name__ == "__main__":
main()
Describe the bug
It seems that the queue_size and timeout parameters don't play nicely together. When they are used in tandem there seems to be some sort of implicit queuing that happens creating increasing delays in the node subscribing to messages.
To Reproduce
Here is a minimal example to reproduce:
dataflow:
time_publisher.py:
time_subscriber.py
Sample logs from subscriber node:
Expected behavior
The printed time differences should remain somewhat stable since the queue should just give the node the most recent message
Screenshots or Video
If applicable, add screenshots to help explain your problem.
Environments (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: