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
In the add-numbers node, I use a while True loop to continuously retrieve the value of num2. After successfully obtaining the value of num2, I attempt to use the same method to retrieve the value of num1, but I find that num1 is no longer available and has become None. Could you provide a detailed explanation of the event delivery mechanism and its underlying logic?
To fix this, store num1 when it is first received (using the on_input callback) and wait for num2 to arrive before performing the addition. Avoid while True loops; rely on event triggers to manage state. Ensure nodes handle inputs asynchronously, preserving data between events for correct computation.
What’s happening here is that when the first number is received from the terminal input or data, it’s consumed by the add-numbers function. By the time the second number, num2, arrives, num1 is no longer available, so it returns None.
In the add-numbers node, I use a while True loop to continuously retrieve the value of num2. After successfully obtaining the value of num2, I attempt to use the same method to retrieve the value of num1, but I find that num1 is no longer available and has become None. Could you provide a detailed explanation of the event delivery mechanism and its underlying logic?
Environments
Additional context
The dataflow configuration is as follows:
Add Logging:
add-numbers-nodes-logs:
num2 : 40
num1 : None
The text was updated successfully, but these errors were encountered: