-
Notifications
You must be signed in to change notification settings - Fork 15
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
Asynchronously run software updates discovery when applying settings #2533
Asynchronously run software updates discovery when applying settings #2533
Conversation
b5095d7
to
ca4992d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Looks good
pids | ||
|> List.delete(pid) | ||
|> wait_for_pids() | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we want to add some after
to receive
so it doesn't hang forever if the process doesn't end,
Maybe some optional timeout value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we go e3b075b.
thanks @arbulu89! I am still testing a few things out 'cause I noticed a weird behavior, like the thing seems to still be blocking in a Besides this I was also thinking that maybe we can make async also the discovery happening in What do you think? |
I don't find it really needed there. In that scenario, we are not in a rush to make things happen, and besides, once the authentication and requests are separated, it will only "block" the 1st call, and from that point on, all the queries would be done in parallel. |
I am not sure the following is completely correct 🤔
What happens in But maybe I am missing something. Anyway, I won't change what happens in the listener for the time being. |
…ettings and asynchronously trigger software updates discovery
ca4992d
to
e3b075b
Compare
@nelsonkopliku Let's start from the beginning. If the authentication fails in both, well, both will fail at the same time |
Description
This PR makes sure the software updates discovery for all the hosts in the system is triggered asynchronously on save/change settings.
Also, in order to avoid unwanted side effects the Discovery state gets cleared right before triggering async discovery, so that the state gest reconstituted with new settings.
Keeps the save/change settings operation quite immediate not impacting performance when discovery needs to be executed for many hosts.
How was this tested?
Automated tests.