|
@@ -57,17 +57,17 @@ class Tasks(BaseCommand): |
|
|
tname = thread.name |
|
|
tname = thread.name |
|
|
if tname == "MainThread": |
|
|
if tname == "MainThread": |
|
|
tname = self.get_main_thread_name() |
|
|
tname = self.get_main_thread_name() |
|
|
normal_threads.append("{} (running as main thread)".format(tname)) |
|
|
|
|
|
|
|
|
normal_threads.append("\x0302{}\x0301 (running as main thread)".format(tname)) |
|
|
elif tname in ["irc-frontend", "irc-watcher", "wiki-scheduler"]: |
|
|
elif tname in ["irc-frontend", "irc-watcher", "wiki-scheduler"]: |
|
|
normal_threads.append(tname) |
|
|
|
|
|
|
|
|
normal_threads.append("\x0302{}\x0301".format(tname)) |
|
|
else: |
|
|
else: |
|
|
task_thread_num += 1 |
|
|
task_thread_num += 1 |
|
|
task_threads.append(tname) |
|
|
|
|
|
|
|
|
task_threads.append("\x0302{}\x0301".format(tname)) |
|
|
|
|
|
|
|
|
if task_threads: |
|
|
if task_threads: |
|
|
msg = "\x0302{}\x0301 threads active: {} and \x0302{}\x0301 tasks: {}.".format(len(threads), ', '.join(normal_threads), task_thread_num, ', '.join(task_threads)) |
|
|
|
|
|
|
|
|
msg = "\x0303{}\x0301 threads active: {}, and \x0303{}\x0301 tasks: {}.".format(len(threads), ', '.join(normal_threads), task_thread_num, ', '.join(task_threads)) |
|
|
else: |
|
|
else: |
|
|
msg = "\x0302{}\x0301 threads active: {} and \x03020\x0301 tasks.".format(len(threads), ', '.join(normal_threads)) |
|
|
|
|
|
|
|
|
msg = "\x0303{}\x0301 threads active: {}, and \x03030\x0301 tasks.".format(len(threads), ', '.join(normal_threads)) |
|
|
self.connection.reply(self.data, msg) |
|
|
self.connection.reply(self.data, msg) |
|
|
|
|
|
|
|
|
def do_listall(self): |
|
|
def do_listall(self): |
|
|