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

Wondering if this can handle multiple requests at once? #59

Open
dorienh opened this issue May 8, 2023 · 3 comments
Open

Wondering if this can handle multiple requests at once? #59

dorienh opened this issue May 8, 2023 · 3 comments

Comments

@dorienh
Copy link

dorienh commented May 8, 2023

If I were to send 5 webhooks at the same time (each for different strategies), would I be able to handle them properly?

@robswc
Copy link
Owner

robswc commented May 8, 2023

Good question!

It will depend on if the action contains "blocking" functions. i.e. if the action takes a minute to complete, it would take 5 min to complete 5 times.

I could look into making "AsyncActions" which would not be blocking.

Btw, this is all assuming you get 5 actions at once. If you're just talking about 5 strategies that don't all fire at once (and your actions don't take minutes upon minutes to complete) you should be fine! It could theoretically handle unlimited strategies, only limited to how long the actions take to complete.

@dorienh
Copy link
Author

dorienh commented May 9, 2023

I'm mostly wondering if any webhook may get lost. Imagine a close short order comes (takes 5s to execute), but the next open long webhook comes 1s later. It's put in some queue?

@devmehta91
Copy link

afaik he's saying to adapt the action function to run asynchronously -- then this would not be issue, ever.

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

3 participants