Skip to content

Commit

Permalink
fix(docs): queue consumer inflight handler not supposed to have a ret…
Browse files Browse the repository at this point in the history
…urn type (#6671)

Copied this code locally, unless I'm mistaken (high chance at the moment 😅), this inflight code does not return anything?

Copying the code shows errors in the IDE.

From what I understand nothing is returned, so I removed the return type in the example.

*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)*.
  • Loading branch information
boyney123 committed Jun 10, 2024
1 parent bfac387 commit 2618442
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/02-concepts/00-cloud-oriented-programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let queue = new cloud.Queue(timeout: 2m);
let bucket = new cloud.Bucket();
let counter = new cloud.Counter(initial: 100);

queue.setConsumer(inflight (body: str): str => {
queue.setConsumer(inflight (body: str) => {
let next = counter.inc();
let key = "myfile-{next}.txt";
bucket.put(key, body);
Expand Down

0 comments on commit 2618442

Please sign in to comment.