Skip to content

Commit 8672b83

Browse files
philnashdkundel
authored andcommitted
Adds section on concurrency to README.
Also rejigs heading hierarchy.
1 parent d7b5571 commit 8672b83

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

packages/plugin-serverless/README.md

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ debug and deploy to Twilio Serverless. It's a part of the [Serverless Toolkit](h
1515
* [License](#license)
1616
<!-- tocstop -->
1717

18-
# Requirements
18+
## Requirements
1919

20-
## Install the Twilio CLI
20+
### Install the Twilio CLI
2121

2222
Via `npm` or `yarn`:
2323

@@ -32,7 +32,7 @@ Via `homebrew`:
3232
$ brew tap twilio/brew && brew install twilio
3333
```
3434

35-
# Usage
35+
## Usage
3636

3737
```sh-session
3838
$ twilio plugins:install @twilio-labs/plugin-serverless
@@ -42,7 +42,18 @@ USAGE
4242
...
4343
```
4444

45-
# Commands
45+
### Concurrency
46+
47+
When deploying lots of Functions and Assets it is possible to run up against the enforced concurrency limits of the Twilio API. You can limit the concurrency and set how many times the library retries API requests using environment variables.
48+
49+
The default concurrency is 50 and the default number of retries is 10. You can change this by setting environment variables. The following would set concurrency to 1, only 1 live request at a time, and retries to 0, so if it fails it won't retry.
50+
51+
```sh-session
52+
export TWILIO_SERVERLESS_API_CONCURRENCY=1
53+
export TWILIO_SERVERLESS_API_RETRY_LIMIT=0
54+
```
55+
56+
## Commands
4657

4758
<!-- commands -->
4859
* [`twilio serverless:deploy`](#twilio-serverlessdeploy)
@@ -54,7 +65,7 @@ USAGE
5465
* [`twilio serverless:promote`](#twilio-serverlesspromote)
5566
* [`twilio serverless:start [DIR]`](#twilio-serverlessstart-dir)
5667

57-
## `twilio serverless:deploy`
68+
### `twilio serverless:deploy`
5869

5970
Deploys existing functions and assets to Twilio
6071

@@ -104,7 +115,7 @@ OPTIONS
104115

105116
_See code: [src/commands/serverless/deploy.js](https://github.com/twilio-labs/plugin-serverless/blob/v1.7.1/src/commands/serverless/deploy.js)_
106117

107-
## `twilio serverless:init NAME`
118+
### `twilio serverless:init NAME`
108119

109120
Creates a new Twilio Function project
110121

@@ -134,7 +145,7 @@ OPTIONS
134145

135146
_See code: [src/commands/serverless/init.js](https://github.com/twilio-labs/plugin-serverless/blob/v1.7.1/src/commands/serverless/init.js)_
136147

137-
## `twilio serverless:list [TYPES]`
148+
### `twilio serverless:list [TYPES]`
138149

139150
List existing services, environments, variables, deployments for your Twilio Serverless Account
140151

@@ -171,7 +182,7 @@ OPTIONS
171182

172183
_See code: [src/commands/serverless/list.js](https://github.com/twilio-labs/plugin-serverless/blob/v1.7.1/src/commands/serverless/list.js)_
173184

174-
## `twilio serverless:list-templates`
185+
### `twilio serverless:list-templates`
175186

176187
Lists the available Twilio Function templates
177188

@@ -185,7 +196,7 @@ OPTIONS
185196

186197
_See code: [src/commands/serverless/list-templates.js](https://github.com/twilio-labs/plugin-serverless/blob/v1.7.1/src/commands/serverless/list-templates.js)_
187198

188-
## `twilio serverless:logs`
199+
### `twilio serverless:logs`
189200

190201
Print logs from your Twilio Serverless project
191202

@@ -223,7 +234,7 @@ OPTIONS
223234

224235
_See code: [src/commands/serverless/logs.js](https://github.com/twilio-labs/plugin-serverless/blob/v1.7.1/src/commands/serverless/logs.js)_
225236

226-
## `twilio serverless:new [NAMESPACE]`
237+
### `twilio serverless:new [NAMESPACE]`
227238

228239
Creates a new Twilio Function based on an existing template
229240

@@ -241,7 +252,7 @@ OPTIONS
241252

242253
_See code: [src/commands/serverless/new.js](https://github.com/twilio-labs/plugin-serverless/blob/v1.7.1/src/commands/serverless/new.js)_
243254

244-
## `twilio serverless:promote`
255+
### `twilio serverless:promote`
245256

246257
Promotes an existing deployment to a new environment
247258

@@ -288,7 +299,7 @@ ALIASES
288299

289300
_See code: [src/commands/serverless/promote.js](https://github.com/twilio-labs/plugin-serverless/blob/v1.7.1/src/commands/serverless/promote.js)_
290301

291-
## `twilio serverless:start [DIR]`
302+
### `twilio serverless:start [DIR]`
292303

293304
Starts local Twilio Functions development server
294305

@@ -340,15 +351,15 @@ ALIASES
340351
_See code: [src/commands/serverless/start.js](https://github.com/twilio-labs/plugin-serverless/blob/v1.7.1/src/commands/serverless/start.js)_
341352
<!-- commandsstop -->
342353

343-
# Contributing
354+
## Contributing
344355

345356
This project welcomes contributions from the community. Please see the [`CONTRIBUTING.md`](CONTRIBUTING.md) file for more details.
346357

347-
## Code of Conduct
358+
### Code of Conduct
348359

349360
Please be aware that this project has a [Code of Conduct](https://github.com/twilio-labs/.github/blob/master/CODE_OF_CONDUCT.md). The tldr; is to just be excellent to each other ❤️
350361

351-
## Contributors
362+
### Contributors
352363

353364
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
354365

@@ -366,6 +377,6 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
366377

367378
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
368379

369-
# License
380+
## License
370381

371382
MIT

0 commit comments

Comments
 (0)