From 8dc3e53688346f732b1db2dbfa73f177d59dc682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Srokosz?= Date: Fri, 4 Oct 2024 17:18:50 +0200 Subject: [PATCH 1/2] Fix: wrong condition in draksetup scale --- drakrun/drakrun/draksetup/scale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drakrun/drakrun/draksetup/scale.py b/drakrun/drakrun/draksetup/scale.py index 156b2d29..1d066935 100644 --- a/drakrun/drakrun/draksetup/scale.py +++ b/drakrun/drakrun/draksetup/scale.py @@ -12,7 +12,7 @@ @click.argument("scale_count", type=int) def scale(scale_count): """Enable or disable additional parallel instances of drakrun service..""" - if scale_count >= 0: + if scale_count < 0: raise RuntimeError( "Invalid value of scale parameter - must be a positive number." ) From f4885d78f32029bf719878815994a639d3748019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Srokosz?= Date: Fri, 4 Oct 2024 17:20:56 +0200 Subject: [PATCH 2/2] Update scale.py --- drakrun/drakrun/draksetup/scale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drakrun/drakrun/draksetup/scale.py b/drakrun/drakrun/draksetup/scale.py index 1d066935..8efefbf4 100644 --- a/drakrun/drakrun/draksetup/scale.py +++ b/drakrun/drakrun/draksetup/scale.py @@ -14,7 +14,7 @@ def scale(scale_count): """Enable or disable additional parallel instances of drakrun service..""" if scale_count < 0: raise RuntimeError( - "Invalid value of scale parameter - must be a positive number." + "Invalid value of scale parameter - must be a non-negative number." ) cur_services = set(list(get_enabled_drakruns()))