Skip to content

Commit 72cbd81

Browse files
authored
chore(docs): add push batch to cloud.queue example in the docs (#3877)
Show in the `cloud.Queue` example that you can push multiple messages at once if you want. *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)*.
1 parent 31c52b9 commit 72cbd81

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

docs/docs/04-standard-library/01-cloud/queue.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ let q = new cloud.Queue();
5151

5252
new cloud.Function(inflight () => {
5353
q.push("message a");
54-
q.push("message b");
55-
q.push("message c");
56-
q.push("message d");
54+
q.push("message b", "message c", "message d");
5755
log("approxSize is ${q.approxSize()}");
5856
log("popping message ${q.pop()}");
5957
log("popping message ${q.pop()}");

libs/wingsdk/src/cloud/queue.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ let q = new cloud.Queue();
5151

5252
new cloud.Function(inflight () => {
5353
q.push("message a");
54-
q.push("message b");
55-
q.push("message c");
56-
q.push("message d");
54+
q.push("message b", "message c", "message d");
5755
log("approxSize is ${q.approxSize()}");
5856
log("popping message ${q.pop()}");
5957
log("popping message ${q.pop()}");

0 commit comments

Comments
 (0)