Explorar o código

Merge branch 'mattwilliamson/master'

Ask Solem %!s(int64=13) %!d(string=hai) anos
pai
achega
7faf3df81c
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      celery/events/cursesmon.py

+ 2 - 1
celery/events/cursesmon.py

@@ -314,8 +314,9 @@ class CursesMonitor(object):
         timestamp = datetime.utcfromtimestamp(
         timestamp = datetime.utcfromtimestamp(
                         task.timestamp or time.time())
                         task.timestamp or time.time())
         timef = timestamp.strftime("%H:%M:%S")
         timef = timestamp.strftime("%H:%M:%S")
+        hostname = task.worker.hostname if task.worker else '*NONE*'
         line = self.format_row(task.uuid, task.name,
         line = self.format_row(task.uuid, task.name,
-                               task.worker.hostname,
+                               hostname,
                                timef, task.state)
                                timef, task.state)
         self.win.addstr(lineno, LEFT_BORDER_OFFSET, line, attr)
         self.win.addstr(lineno, LEFT_BORDER_OFFSET, line, attr)