5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-31 01:48:09 +03:00

api: admin/datastore: enable streaming for some api calls

namely /admin/datastore/{store}/snapshots
and /nodes/{node}/tasks

since those are api calls where the result can get quite large
with this change, the serialization is now streaming instead of making
a `Value` in memory.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Dominik Csapak 2022-04-12 16:15:10 +02:00 committed by Wolfgang Bumiller
parent 32e2b5abe6
commit b7c3eaa981
2 changed files with 2 additions and 0 deletions

View File

@ -375,6 +375,7 @@ pub fn delete_snapshot(
} }
#[api( #[api(
streaming: true,
input: { input: {
properties: { properties: {
store: { store: {

View File

@ -380,6 +380,7 @@ fn stop_task(
} }
#[api( #[api(
streaming: true,
input: { input: {
properties: { properties: {
node: { node: {