소스 검색

Fix two bugs:
One, the hrule above the footer overwrote the right border; all better now.

Two, the limit of the number of tasks was in no way reflective of the space on the display for showing the tasks. The limit is now taken from the vertical display area.

Chris Rose 14 년 전
부모
커밋
d2595dcc95
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      celery/events/cursesmon.py

+ 5 - 2
celery/events/cursesmon.py

@@ -29,7 +29,6 @@ class CursesMonitor(object):
     selected_task = None
     selected_position = 0
     selected_str = "Selected: "
-    limit = 20
     foreground = curses.COLOR_BLACK
     background = curses.COLOR_WHITE
     online_str = "Workers online: "
@@ -96,6 +95,10 @@ class CursesMonitor(object):
         my, _ = self.win.getmaxyx()
         return my - 10
 
+    @property
+    def limit(self):
+        return self.display_height
+
     def find_position(self):
         if not self.tasks:
             return 0
@@ -335,7 +338,7 @@ class CursesMonitor(object):
 
         # -- Footer
         blank_line()
-        win.hline(my - 6, x, curses.ACS_HLINE, self.screen_width)
+        win.hline(my - 6, x, curses.ACS_HLINE, self.screen_width - 4)
 
         # Selected Task Info
         if self.selected_task: