Skip to content

Commit c007b7d

Browse files
authored
include async YAML instructions
1 parent cdbae55 commit c007b7d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ monitor.ping(
129129
You can configure all of your monitors using a single YAML file. This can be version controlled and synced to Cronitor as part of
130130
a deployment or build process. For details on all of the attributes that can be set, see the [Monitor API](https://cronitor.io/docs/monitor-api) documentation.
131131

132+
### YAML Configuration.
132133

133134
```python
134135
import cronitor
@@ -197,6 +198,9 @@ heartbeats:
197198
events: true # send alert when the event occurs
198199

199200
```
201+
If you are working with large YAML files (300+ monitors), you may hit timeouts when trying to sync monitors in a single http request. This workload to be processed asynchronously by adding the key `async: true` to the config file. The request will immediately return a `batch_key`. If a `webhook_url` parameter is included, Cronitor will POST to that URL with the results of the background processing and will include the `batch_key` matching the one returned in the initial response.
202+
203+
### Monitor.put
200204

201205
You can also create and update monitors by calling `Monitor.put`. For details on all of the attributes that can be set see the Monitor API [documentation)(https://cronitor.io/docs/monitor-api#attributes).
202206

0 commit comments

Comments
 (0)