diff --git a/docs.json b/docs.json index 27f7121b..66f80cbc 100644 --- a/docs.json +++ b/docs.json @@ -1292,7 +1292,8 @@ "pages": [ "workflow/features/flow-control", "workflow/features/flow-control/rate-period", - "workflow/features/flow-control/parallelism" + "workflow/features/flow-control/parallelism", + "workflow/features/flow-control/monitor" ] }, { diff --git a/img/qstash/flowcontrol.png b/img/qstash/flowcontrol.png new file mode 100644 index 00000000..15af4794 Binary files /dev/null and b/img/qstash/flowcontrol.png differ diff --git a/qstash/api/flow-control/get.mdx b/qstash/api/flow-control/get.mdx index 6d2ae8cb..769d5838 100644 --- a/qstash/api/flow-control/get.mdx +++ b/qstash/api/flow-control/get.mdx @@ -18,7 +18,7 @@ authMethod: "bearer" - The number of messages in the wait list that waits for `parallelism` set in the flow control. + The number of messages in the wait list that waits for `parallelism`/`rate` set in the flow control. diff --git a/qstash/api/flow-control/list.mdx b/qstash/api/flow-control/list.mdx index a4302390..e5990147 100644 --- a/qstash/api/flow-control/list.mdx +++ b/qstash/api/flow-control/list.mdx @@ -13,7 +13,7 @@ authMethod: "bearer" - The number of messages in the wait list that waits for `parallelism` set in the flow control. + The number of messages in the wait list that waits for `parallelism`/`rate` set in the flow control. diff --git a/qstash/features/flowcontrol.mdx b/qstash/features/flowcontrol.mdx index 0ff31f69..3d252861 100644 --- a/qstash/features/flowcontrol.mdx +++ b/qstash/features/flowcontrol.mdx @@ -76,7 +76,7 @@ curl -XPOST -H 'Authorization: Bearer XXX' \ You can also use the Rest API to get information how many messages waiting for parallelism limit. See the [API documentation](/qstash/api/flow-control/get) for more details. -### Rate, Parallelism, and Period Together +## Rate, Parallelism, and Period Together All three parameters can be combined. For example, with a rate of 10 per minute, parallelism of 20, and a period of 1 minute, QStash will trigger 10 calls in the first minute and another 10 in the next. Since none of them will have finished, the system will wait until one completes before triggering another. @@ -99,4 +99,16 @@ curl -XPOST -H 'Authorization: Bearer XXX' \ 'https://qstash.upstash.io/v2/publish/https://example.com' \ -d '{"message":"Hello, World!"}' ``` - \ No newline at end of file + + +## Monitor + +You can monitor wait list size of your flow control key's from the console `FlowControl` tab. + + + + + +Also you can get the same info using the REST API. +- [List All Flow Control Keys](/qstash/api/flow-control/list). +- [Single Flow Control Key](/qstash/api/flow-control/get). diff --git a/workflow/features/flow-control/monitor.mdx b/workflow/features/flow-control/monitor.mdx new file mode 100644 index 00000000..1820de21 --- /dev/null +++ b/workflow/features/flow-control/monitor.mdx @@ -0,0 +1,14 @@ +--- +title: "Monitoring" +--- + +You can monitor wait list size of your flow control key's from the console `FlowControl` tab. + + + + + +Also you can get the same info using the REST API. +- [List All Flow Control Keys](/workflow/rest/flow-control/list). +- [Single Flow Control Key](/workflow/rest/flow-control/get). + diff --git a/workflow/features/flow-control/parallelism.mdx b/workflow/features/flow-control/parallelism.mdx index e75fd8d3..143458e6 100644 --- a/workflow/features/flow-control/parallelism.mdx +++ b/workflow/features/flow-control/parallelism.mdx @@ -44,34 +44,3 @@ The step in the waitlist will wait for a step to complete and hand off it's toke - -## Monitoring - -You can monitor wait list size of your flow control key's using the REST API. - - - -```bash Single Flow Control Key -curl -X GET https://qstash.upstash.io/v2/flowControl/YOUR_FLOW_CONTROL_KEY \ - -H "Authorization: Bearer " -``` - -```bash List All Flow Control Keys -curl -X GET https://qstash.upstash.io/v2/flowControl/ \ - -H "Authorization: Bearer " -``` - - -It will return the wait list size. In case you request all flow-control keys, it is an array response. - - - The identifier for your flow control configuration - - - - Number of steps waiting to be executed due to parallelism limits - - - - Adding a dashboard to list and manage flow control key's is on our roadmap. - diff --git a/workflow/rest/flow-control/get.mdx b/workflow/rest/flow-control/get.mdx index ea38e499..a9257bc9 100644 --- a/workflow/rest/flow-control/get.mdx +++ b/workflow/rest/flow-control/get.mdx @@ -18,7 +18,7 @@ authMethod: "bearer" - The number of messages in the wait list that waits for `parallelism` set in the flow control. + The number of messages in the wait list that waits for `parallelism`/`rate` set in the flow control. diff --git a/workflow/rest/flow-control/list.mdx b/workflow/rest/flow-control/list.mdx index ecbc8820..ec8d6c36 100644 --- a/workflow/rest/flow-control/list.mdx +++ b/workflow/rest/flow-control/list.mdx @@ -13,7 +13,7 @@ authMethod: "bearer" - The number of messages in the wait list that waits for `parallelism` set in the flow control. + The number of messages in the wait list that waits for `parallelism`/`rate` set in the flow control.