Fix up the event_stats command and include web queue data
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.core.cache import cache
|
||||
from api import events
|
||||
from minecraft.models import Server
|
||||
|
||||
@@ -13,12 +14,18 @@ class Command(BaseCommand):
|
||||
print s
|
||||
for k,v in stats.iteritems():
|
||||
print "\t%s: %s"%(k, v)
|
||||
print "\tTubes:"
|
||||
for t in queue.tubes():
|
||||
print "\t\t%s"%(t)
|
||||
queue.use(t)
|
||||
next = queue.peek_ready()
|
||||
if next:
|
||||
print "\t\t\tNext job: %s"%(next.body)
|
||||
else:
|
||||
print "\t\t\tNo pending job."
|
||||
print "Tubes:"
|
||||
for t in queue.tubes():
|
||||
print "\t%s"%(t)
|
||||
queue.use(t)
|
||||
next = queue.peek_ready()
|
||||
if next:
|
||||
print "\t\tNext job: %s"%(next.body)
|
||||
else:
|
||||
print "\t\tNo pending job."
|
||||
print "Web queues:"
|
||||
webQueues = cache.get("minecraft-web-queues")
|
||||
if webQueues is None:
|
||||
webQueues = {}
|
||||
for queue,stamp in webQueues.iteritems():
|
||||
"\t%s: %d"%(queue, stamp)
|
||||
|
Reference in New Issue
Block a user