public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [RFC qemu-server 4/4] QMP client: code cleanup: sort commands with 10 minutes timeout alphabetically
Date: Fri,  9 Feb 2024 13:14:27 +0100	[thread overview]
Message-ID: <20240209121427.39046-5-f.ebner@proxmox.com> (raw)
In-Reply-To: <20240209121427.39046-1-f.ebner@proxmox.com>

Signed-off-by: Fiona Ebner <f.ebner@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





  parent reply	other threads:[~2024-02-09 12:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-09 12:14 [pve-devel] [PATCH-SERIES qemu-server] small improvements in QMP client module Fiona Ebner
2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 1/4] QMP client: increase default timeout for drive-mirror to 10 minutes Fiona Ebner
2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 2/4] QMP client: remove unnecessary question mark from comment Fiona Ebner
2024-02-09 12:14 ` [pve-devel] [PATCH qemu-server 3/4] QMP client: add missing use statement Fiona Ebner
2024-02-09 12:14 ` Fiona Ebner [this message]
2024-03-08 13:48 ` [pve-devel] applied-series: [PATCH-SERIES qemu-server] small improvements in QMP client module Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240209121427.39046-5-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal