[pve-devel] [RFC qemu-server 4/4] QMP client: code cleanup: sort commands with 10 minutes timeout alphabetically
Fiona Ebner
f.ebner at proxmox.com
Fri Feb 9 13:14:27 CET 2024
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
It's kind of grouped by related operations right now, but not
consistently. Making it consistent and sorting the groups is a
potential alternative.
PVE/QMPClient.pm | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/PVE/QMPClient.pm b/PVE/QMPClient.pm
index 4c025b36..a785d9a1 100644
--- a/PVE/QMPClient.pm
+++ b/PVE/QMPClient.pm
@@ -119,19 +119,19 @@ sub cmd {
# that are executed upon thaw, so use 3 minutes to be on the safe side.
$timeout = 3 * 60;
} elsif (
- $cmd->{execute} eq 'savevm-start' ||
- $cmd->{execute} eq 'savevm-end' ||
- $cmd->{execute} eq 'query-backup' ||
- $cmd->{execute} eq 'drive-mirror' ||
- $cmd->{execute} eq 'query-block-jobs' ||
+ $cmd->{execute} eq 'backup-cancel' ||
+ $cmd->{execute} eq 'blockdev-snapshot-delete-internal-sync' ||
+ $cmd->{execute} eq 'blockdev-snapshot-internal-sync' ||
$cmd->{execute} eq 'block-job-cancel' ||
$cmd->{execute} eq 'block-job-complete' ||
- $cmd->{execute} eq 'backup-cancel' ||
- $cmd->{execute} eq 'query-savevm' ||
+ $cmd->{execute} eq 'drive-mirror' ||
$cmd->{execute} eq 'guest-fstrim' ||
$cmd->{execute} eq 'guest-shutdown' ||
- $cmd->{execute} eq 'blockdev-snapshot-internal-sync' ||
- $cmd->{execute} eq 'blockdev-snapshot-delete-internal-sync'
+ $cmd->{execute} eq 'query-backup' ||
+ $cmd->{execute} eq 'query-block-jobs' ||
+ $cmd->{execute} eq 'query-savevm' ||
+ $cmd->{execute} eq 'savevm-end' ||
+ $cmd->{execute} eq 'savevm-start'
) {
$timeout = 10*60; # 10 mins
} else {
--
2.39.2
More information about the pve-devel
mailing list