Rate-Limit
interface WorkerMetadata {
opts?: {
limiter?: {
max: number; // integer representing max number of jobs to process on "duration"
duration: number: // number of millisecons
}
// .. more options
}
// .. more options
}curl --location 'http://localhost:8080/workers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1234' \
--data '{
"queue": "my-test-queue",
"opts": {
"concurrency": 300,
"limiter": {
"max": 100,
"duration": 1000
}
},
"endpoint": {
"url": "http://mydomain.dev",
"method": "post"
}
}'Last updated