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

Parallelize SUMA queries using ParallelStream #2525

Merged
merged 1 commit into from
Apr 17, 2024

Conversation

arbulu89
Copy link
Contributor

Description

Parallelize SUMA queries during the discovery. Using ParallelStream we can easily achieve that.
It uses a typical workers pool behind the scene to balance the concurrency. The defaults values are here: https://github.com/beatrichartz/parallel_stream/blob/main/lib/parallel_stream/defaults.ex

How was this tested?

Tests update. I have tested a bit manually, adding some sleeps here and there to see that all the tasks are done in parallel, which are

@arbulu89 arbulu89 added the enhancement New feature or request label Apr 16, 2024
Copy link
Member

@nelsonkopliku nelsonkopliku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @arbulu89 🚀

@arbulu89 arbulu89 added the env Create an ephimeral environment for the pr branch label Apr 16, 2024
@arbulu89 arbulu89 marked this pull request as ready for review April 16, 2024 15:32
Copy link
Contributor

@abravosuse abravosuse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both following test pass:

  • empty trento + empty settings-> save settings -> new hosts discovered + software updates discovery happening
  • populated trento + empty settings -> save settings -> software updates discovery happening

Copy link
Contributor

@jamie-suse jamie-suse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice 🚀

@arbulu89 arbulu89 merged commit 85dad56 into main Apr 17, 2024
73 of 76 checks passed
@arbulu89 arbulu89 deleted the parallelize-suma-queries branch April 17, 2024 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request env Create an ephimeral environment for the pr branch
Development

Successfully merging this pull request may close these issues.

None yet

4 participants