Close a window of opportunity in ElsaRegistry #19
Merged
Conversation
…e the random startup crashes we've had.
nathanmonteleone
requested review from
LiruMouse,
ctcline-simplifi and
joshuawscott
as code owners
June 16, 2026 18:03
|
|
||
| defp wait_for(name) do | ||
| case Process.whereis(name) do | ||
| case whereis(name) do |
Author
There was a problem hiding this comment.
This was just a fairly clear oversight from the original library -- there's a whereis override that handles ":via" lookups, but it was only being used on startup and was forgotten about here.
ctcline-simplifi
approved these changes
Jun 16, 2026
| case registry_module.whereis_name(lookup) do | ||
| :undefined -> nil | ||
| pid -> pid | ||
| end |
Author
There was a problem hiding this comment.
I added this bit just so that we'd be consistent within this module, instead of having a mixture of ":undefined" and "nil" for not-found processes.
davidnsimplifi
approved these changes
Jun 16, 2026
joshuawscott
approved these changes
Jun 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This should take care of the random startup crashes we've had for like a year now.
https://simplifi.atlassian.net/browse/INT-11129
I found this using Claude. The comments in the actual committed code are my own paraphrasing; please let me know if they're too wordy or get anything wrong.
Note this was not a severe bug to begin with -- the supervisor tree usually just restarted everything and we would reconnect fine. But it might help alleviate some confusion in the future to have this fixed.
Original prompt and feedback: