Skip to content

Commit 3025c74

Browse files
committed
Remove all_queues_depth from queue_depth command
1 parent 8ea8d81 commit 3025c74

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

django_dbq/management/commands/queue_depth.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff 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
)

django_dbq/tests.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff 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()

0 commit comments

Comments
 (0)