-
Notifications
You must be signed in to change notification settings - Fork 196
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
cloud.Queue.pop() #1385
Comments
Assign it to me sir I want to work on it |
And please elaborate this issue |
@Bharadwajshivam28 This issue is about implementing the bring cloud;
let q = new cloud.Queue();
new cloud.Function(inflight () => {
q.push("hello");
q.push("world");
let item = q.pop();
// Right now we are not assuming the queue is FIFO
assert(item == "hello" || item == "world");
}) as "test"; Here's an example of a PR that added two inflight methods whose code could be helpful to look at as a reference https://github.com/winglang/wing/pull/1712/files |
okay |
thanks |
@Chriscbr can you please drop a short demo video .. like then it will be good for me work .. if you can then please |
Hey @Bharadwajshivam28 - I highly recommend you first check out our development guide! It will guide you on how to build our monorepo, which contains all of the code for the Wing compiler toolchain. We are still working on improving this guide, so if you run into errors or problems getting the project to build locally, please let us know since it's still changing. 🙂 |
Okay thanks |
This code change adds support for sim and aws targets. Besides, it updates the spec to return an optional instead as proposed in #2284. Closes #1385 and #2284 *By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*.
Congrats! 🚀 This was released in Wing 0.17.9. |
Related to #3897 We have a flakey test in our CI that validates part of the functionality of `cloud.Queue`. It turns out, our test was assuming that the queue messages are received in FIFO order (first-in-first-out), which wasn't something we meant to guarantee (see the original issue about `queue.pop()` [here](#1385)). This PR fixes the test, and updates the simulator implementation to reflect the fact that messages can be received out of order. (Why not FIFO by default? For many distributed apps, the exact order of messages isn't critical, and relaxing this constraint makes it easier to handle higher throughputs of messages. That said, adding a `fifo` option to `cloud.Queue` would be reasonable as a future enhancement) ## Checklist - [x] Title matches [Winglang's style guide](https://www.winglang.io/contributing/start-here/pull_requests#how-are-pull-request-titles-formatted) - [x] Description explains motivation and solution - [x] Tests added (always) - [ ] Docs updated (only required for features) - [ ] Added `pr/e2e-full` label if this feature requires end-to-end testing *By submitting this pull request, I confirm that my contribution is made under the terms of the [Wing Cloud Contribution License](https://github.com/winglang/wing/blob/main/CONTRIBUTION_LICENSE.md)*.
https://docs.winglang.io/reference/wingsdk-spec#queue
The text was updated successfully, but these errors were encountered: