Skip to content

Commit 15f14ee

Browse files
chengzeyiclaude
andcommitted
Add concurrency_modifier usage to README
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 9c90fcd commit 15f14ee

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,25 @@ def handler(job):
146146
return {"output": "done"}
147147
```
148148

149+
### Concurrent Execution
150+
151+
Enable concurrent job processing with `concurrency_modifier`:
152+
153+
```python
154+
import wavespeed.serverless as serverless
155+
156+
def handler(job):
157+
return {"output": job["input"]["data"]}
158+
159+
def concurrency_modifier(current_concurrency):
160+
return 2 # Process 2 jobs concurrently
161+
162+
serverless.start({
163+
"handler": handler,
164+
"concurrency_modifier": concurrency_modifier
165+
})
166+
```
167+
149168
## Local Development
150169

151170
### Test with JSON Input

0 commit comments

Comments
 (0)