Skip to content

Commit 64fe956

Browse files
committed
Update docs to include the shutdown endpoint
1 parent d1a80a6 commit 64fe956

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,11 @@ Note that unregistering an ID is destructive and all data for that `id` will be
167167
user@shell> curl -Ss -X DELETE -H 'X-Api-Key: your-api-key-here' 'http://127.0.0.1:5000/unregister?id=testing'
168168
Success
169169
```
170+
171+
### Cleanly shutting down PyXIE
172+
If PyXIE is killed while in the middle of persisting data to disk, it will likely result in a corrupted file. To ensure that your data is complete and well formed, use one of your defined API keys ot send a `POST` request to the `/shutdown` endpoint like in the following example. This will tell PyXIE to write all data to disk and exit.
173+
174+
```bash
175+
user@shell> curl -Ss -X POST -H 'X-Api-Key: your-api-key-here' 'http://127.0.0.1:5000/shutdown'
176+
curl: (52) Empty reply from server
177+
```

0 commit comments

Comments
 (0)