Skip to content

WIP #87

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

WIP #87

wants to merge 6 commits into from

Conversation

mahrous-deriv
Copy link

No description provided.

@@ -364,7 +365,9 @@ Subscription will be done only once within first request to backend server.

sub wait_for_messages {
my ($self) = @_;
$self->{already_waiting} //= $self->redis->subscribe([$self->whoami], $self->redis->curry::weak::on(message => $self->curry::weak::_on_message));
$self->{already_waiting} //=
$self->redis->subscribe(['myriad.' . $self->whoami, $self->whoami],
Copy link

@billmarriott-deriv billmarriott-deriv Apr 26, 2022

Choose a reason for hiding this comment

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

Is it possible to only add the prefix based on msg_group so we can subscribe to a single channel?

Copy link
Author

@mahrous-deriv mahrous-deriv Apr 26, 2022

Choose a reason for hiding this comment

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

Yes, we can also pass the prefix from our API and prepend it to $self->whoami.

@@ -364,7 +365,9 @@ Subscription will be done only once within first request to backend server.

sub wait_for_messages {
my ($self) = @_;
$self->{already_waiting} //= $self->redis->subscribe([$self->whoami], $self->redis->curry::weak::on(message => $self->curry::weak::_on_message));
$self->{already_waiting} //=
$self->redis->subscribe(['myriad.' . $self->whoami, $self->whoami],
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's not add myriad hardcoded in proxy, it's an open source module. Pass it as a config or as a parameter

Copy link
Author

Choose a reason for hiding this comment

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

We can pass it from websocket.conf.

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.

3 participants