Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(shard): manually shard connect and reconnect #596

Merged
merged 12 commits into from
May 22, 2024

Conversation

tignear
Copy link
Contributor

@tignear tignear commented May 15, 2024

This PR provides the user with functions to connect/reconnect/disconnect to the gateway.
In our use case, this allows for zero downtime updates.
This would also advance Issue #542.

# node 1
Nostrum.Shard.Supervisor.connect(0,1) 
info = Nostrum.Shard.Supervisor.disconnect(0)

# node2
Nostrum.Shard.Supervisor.reconnect(info)

@jchristgit jchristgit requested review from jchristgit and jb3 May 17, 2024 17:07
Copy link
Collaborator

@jb3 jb3 left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! This is a really cool feature!

I've tested it locally and all seems to be working solid, my only request is documentation on the new public facing APIs that enable this functionality.

It doesn't need to be incredibly comprehensive but an overview of what happens, what is returned and maybe a little overview of "how it works" (i.e. that it stores the resume information and then opens a new connection with that RESUME payload).

@jchristgit jchristgit requested a review from jb3 May 20, 2024 05:28
Copy link
Collaborator

@jb3 jb3 left a comment

Choose a reason for hiding this comment

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

Looks good!

@jb3 jb3 merged commit eff410b into Kraigie:master May 22, 2024
9 checks passed
@jb3
Copy link
Collaborator

jb3 commented May 22, 2024

Thanks!

@broman
Copy link

broman commented May 22, 2024

Nice! This looks really good! Nostrum!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants