Browse Source

Merge "Excluding number of nodes in stop operation notification"

changes/94/449494/6
Jenkins 2 years ago
parent
commit
9482abc11d
1 changed files with 6 additions and 8 deletions
  1. 6
    8
      nailgun/nailgun/rpc/receiver.py

+ 6
- 8
nailgun/nailgun/rpc/receiver.py View File

@@ -722,7 +722,7 @@ class NailgunReceiver(object):
722 722
                 )
723 723
 
724 724
             message = cls._make_stop_deployment_message(
725
-                task, status, stop_tasks, update_nodes, message)
725
+                task, status, stop_tasks, message)
726 726
 
727 727
             notifier.notify(
728 728
                 "done",
@@ -756,7 +756,7 @@ class NailgunReceiver(object):
756 756
 
757 757
             db().flush()
758 758
             message = cls._make_stop_deployment_message(
759
-                task, status, stop_tasks, update_nodes, message)
759
+                task, status, stop_tasks, message)
760 760
 
761 761
             notifier.notify(
762 762
                 "error",
@@ -770,17 +770,16 @@ class NailgunReceiver(object):
770 770
         cls._update_action_log_entry(status, task.name, task_uuid, nodes)
771 771
 
772 772
     @classmethod
773
-    def _make_stop_deployment_message(cls, task, status, stop_tasks, nodes,
774
-                                      message):
773
+    def _make_stop_deployment_message(cls, task, status, stop_tasks, message):
775 774
         messages_by_status = {
776 775
             consts.TASK_STATUSES.ready: [
777 776
                 u"Deployment of environment '{0}' was successfully stopped. ",
778
-                u"{0} of {1} environment node(s) was successfully stopped. "
777
+                u"{0} of environment was successfully stopped. "
779 778
             ],
780 779
             consts.TASK_STATUSES.error: [
781 780
                 u"Deployment of environment '{0}' was failed to stop: {1}. "
782 781
                 u"Please check logs for details.",
783
-                u"{0} of {1} environment node(s) was failed to stop: {2}. "
782
+                u"{0} of environment was failed to stop: {1}. "
784 783
                 u"Please check logs for details."
785 784
             ]
786 785
         }
@@ -792,8 +791,7 @@ class NailgunReceiver(object):
792 791
         process = u"Deployment"
793 792
         if consts.TASK_NAMES.deployment not in stop_task_names:
794 793
             process = u"Provisioning"
795
-        return messages_by_status[status][1].format(
796
-            process, len(nodes), message)
794
+        return messages_by_status[status][1].format(process, message)
797 795
 
798 796
     @classmethod
799 797
     def _restore_pending_changes(cls, nodes, task, ia_nodes):

Loading…
Cancel
Save