-
Notifications
You must be signed in to change notification settings - Fork 42
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
client:Implemented the enqueuing mechanism for clients #64
Conversation
backend/eventRecipients.ts
Outdated
@@ -31,9 +31,19 @@ export function getClient(clientId: ClientId) { | |||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | |||
export function scheduleSend(clientId: ClientId, event: AppEvent) { | |||
//todo: Enqueue the event for sending. | |||
eventQueue.get(clientId)?.push(event); | |||
} | |||
|
|||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | |||
export function doSendEvent(clientId: ClientId) { |
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.
This is not a part of this PR.
backend/eventRecipients.ts
Outdated
@@ -31,9 +31,19 @@ export function getClient(clientId: ClientId) { | |||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | |||
export function scheduleSend(clientId: ClientId, event: AppEvent) { | |||
//todo: Enqueue the event for sending. | |||
eventQueue.get(clientId)?.push(event); |
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.
You can remove the todo comment and the eslint directive
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@kuv2707 done with the changes |
@kuv2707 edited the commit message. |
@ritwik-69 This can be merged once the merge conflicts are resolved. |
4dd6ce4
to
7bc3d56
Compare
This commits creates a function that pushes the event object into the event queue of a specific client id. Fixes:shivansh-bhatnagar18#60
Merged, thanks @ritwik-69 |
fixes: #60
Description
Created two functions that pushes the event object into the event queue of a specific client id.
The second Function sends the each event of the given client id to all the eligible client id (i.e only if response object is available).
Motivation and Context
[Explain the motivation behind these changes and provide any relevant context.]
How to Test
[Describe the steps to test the changes made in this pull request.]
Related Issues
[If applicable, mention any related issues or pull requests.]
Checklist
Screenshots (if applicable)
[If your changes include any visual updates, provide screenshots here.]