Skip to content

Implementing #restart for the Celluloid Socket class.#244

Merged
dblock merged 9 commits intoslack-ruby:masterfrom
RodneyU215:implement_celluloid_restart
Jan 18, 2019
Merged

Implementing #restart for the Celluloid Socket class.#244
dblock merged 9 commits intoslack-ruby:masterfrom
RodneyU215:implement_celluloid_restart

Conversation

@RodneyU215
Copy link
Copy Markdown
Collaborator

I've also relocated the call to terminate the actor to the disconnect method. This finishes up the implementation so that Celluloid correctly handles restarts. See #236 for details.

Please hold off on merging though as I'm still working through testing these changes.

@RodneyU215 RodneyU215 self-assigned this Jan 14, 2019
@RodneyU215 RodneyU215 requested a review from dblock January 14, 2019 19:55
@dblock
Copy link
Copy Markdown
Collaborator

dblock commented Jan 15, 2019

Great, will wait for 🍏 too.

@RodneyU215
Copy link
Copy Markdown
Collaborator Author

I've found a problem with my initial approach. I'm updating this PR today.

Comment thread lib/slack/real_time/concurrency/celluloid.rb Outdated
queue.pop_with_timeout(5)
expect(@reply_to).to be 1
end
it 'rebuilds the websocket connection when dropped' do
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm not super happy with this test, but it's been the most consistent way I've been able to validate that the reconnect works as expected for each of the 3 supported concurrency libraries.

@RodneyU215
Copy link
Copy Markdown
Collaborator Author

RodneyU215 commented Jan 18, 2019

@dblock I believe this PR is ready for a review. (pending CI tests) Everything passed locally running on Ruby 2.5.3.

@dblock dblock merged commit 283a5d8 into slack-ruby:master Jan 18, 2019
@dblock
Copy link
Copy Markdown
Collaborator

dblock commented Jan 18, 2019

I merged this, thank you. Let's see how it behaves. I need to get a bot on this code, will try to do this next week.

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

Successfully merging this pull request may close these issues.

2 participants