Skip to content

Commit 0a16b75

Browse files
committed
docs: add about force_unique_key to quickstart.md
1 parent 72558af commit 0a16b75

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

docs/source/Quickstart.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ print("Result:", resp.json())
5757

5858
</details>
5959

60-
> Note: You can see the JSON schema for the POST request [here](https://github.com/Eshaan7/Flask-Shell2HTTP/blob/master/post-request-schema.json).
61-
6260
returns JSON,
6361

6462
```json
@@ -89,6 +87,17 @@ Returns result in JSON,
8987
}
9088
```
9189

90+
<div class="admonition note">
91+
<p class="admonition-title">Note</p>
92+
You can see the JSON schema for the POST request, <a href="https://github.com/Eshaan7/Flask-Shell2HTTP/blob/master/post-request-schema.json" target="_blank">here</a>.
93+
</div>
94+
95+
<div class="admonition hint">
96+
<p class="admonition-title">Hint</p>
97+
By default, the <code>key</code> is the SHA1 sum of the <code>command + args</code> POSTed to the API. This is done as a rate limiting measure so as to prevent multiple jobs with same parameters, if one such job is already running. If <code>force_unique_key</code> is set to <code>true</code>, the API will bypass this default behaviour and a psuedorandom key will be returned instead.
98+
</div>
99+
100+
92101
##### Bonus
93102

94103
You can also define callback functions or use signals for reactive programming. There may be cases where the process doesn't print result to standard output but to a file/database. In such cases, you may want to intercept the future object and update it's result attribute.

0 commit comments

Comments
 (0)