Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help: Delay Agent implementation #3404

Open
carmatana opened this issue May 4, 2024 · 0 comments
Open

help: Delay Agent implementation #3404

carmatana opened this issue May 4, 2024 · 0 comments

Comments

@carmatana
Copy link

carmatana commented May 4, 2024

Hello,

I cannot make Delay Agent work.

I am trying to:

(1) I have a list of stock symbols (i.e.: AAPL, GOOGL, etc.)

(2) I get with Website Agent their prices and other data (an event per symbol)

(3) Write this info in a file (an event per symbol)

(4) (THIS IS THE PART THAT IS NOT WORKING) Buffer all events in (3) with Delay Agent and after a while emit an event to the next agent that is:

(5) Read the file info (1 event for ALL symbols)

(6) Format the info

(7) Send a pushover


What I wan to achieve is to have all the symbols written in the file and AFTER everything is written, read the file.

This is a partial view of my flow:

image

My Delay Agent settings:

"max_events": "2", (this is the number of stock symbols I have in my tests)
"keep": "newest",
"max_emitted_events": "1", (I want only want event to be emitted)
"emit_interval": "60", (I would expect that after 60 seconds an event is emitted to the next agent to trigger it)

If I delete the Delay Agent from the flow, the read agent runs multiple times, 1 per writing event.

I want to have the Read Agent run only once, after all the writing has been done.


Any idea how to achieve this ?

I know that I can run the Read Agent with an scheduler, with enough time to ensure that the writing has been done. But I want to try the Delay Agent way.

Thanks for the attention and help !

@carmatana carmatana changed the title help: Delay Agent explanation help: Delay Agent implementation May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant