File tree Expand file tree Collapse file tree 2 files changed +4
-11
lines changed
Expand file tree Collapse file tree 2 files changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -12,12 +12,9 @@ def add_arguments(self, parser):
1212 def handle (self , * args , ** options ):
1313 queue_name = options ["queue_name" ]
1414 queue_depths = Job .get_queue_depths ()
15- all_queues_depth = sum (queue_depths .values ())
1615
1716 self .stdout .write (
18- "queue_name={queue_name} queue_depth={depth} all_queues_depth={all_queues_depth}" .format (
19- all_queues_depth = all_queues_depth ,
20- queue_name = queue_name ,
21- depth = queue_depths .get (queue_name , 0 ),
17+ "queue_name={queue_name} queue_depth={depth}" .format (
18+ queue_name = queue_name , depth = queue_depths .get (queue_name , 0 ),
2219 )
2320 )
Original file line number Diff line number Diff line change @@ -117,17 +117,13 @@ def test_queue_depth(self):
117117 stdout = StringIO ()
118118 call_command ("queue_depth" , stdout = stdout )
119119 output = stdout .getvalue ()
120- self .assertEqual (
121- output .strip (), "queue_name=default queue_depth=2 all_queues_depth=4"
122- )
120+ self .assertEqual (output .strip (), "queue_name=default queue_depth=2" )
123121
124122 def test_queue_depth_for_queue_with_zero_jobs (self ):
125123 stdout = StringIO ()
126124 call_command ("queue_depth" , queue_name = "otherqueue" , stdout = stdout )
127125 output = stdout .getvalue ()
128- self .assertEqual (
129- output .strip (), "queue_name=otherqueue queue_depth=0 all_queues_depth=0"
130- )
126+ self .assertEqual (output .strip (), "queue_name=otherqueue queue_depth=0" )
131127
132128
133129@freezegun .freeze_time ()
You can’t perform that action at this time.
0 commit comments