Prune useless lines from graph script
This commit is contained in:
parent
425bd184df
commit
2e3f80a3f4
@ -28,8 +28,9 @@ class Fmtr(celery.utils.graph.GraphFormatter):
|
|||||||
def label(self, obj):
|
def label(self, obj):
|
||||||
super(Fmtr, self).label(obj)
|
super(Fmtr, self).label(obj)
|
||||||
if obj != None:
|
if obj != None:
|
||||||
logg.debug('obj {} attrs'.format(obj.id))
|
if obj.name == None:
|
||||||
return obj.queue
|
raise RuntimeError('task name is not defined. Did you run celery with result_extended=True?')
|
||||||
|
return obj.name
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@ -41,12 +42,8 @@ def main():
|
|||||||
#callback_queue=args.q,
|
#callback_queue=args.q,
|
||||||
)
|
)
|
||||||
t = api.create_account(register=False)
|
t = api.create_account(register=False)
|
||||||
for e in t.collect():
|
t.get_leaf()
|
||||||
print(e[0].backend.get('celery-task-meta-{}'.format(e[0].id)))
|
t.build_graph(intermediate=True, formatter=Fmtr()).to_dot(sys.stdout)
|
||||||
print(e[0].name)
|
|
||||||
#t.build_graph(intermediate=True, formatter=Fmtr()).to_dot(sys.stdout)ka
|
|
||||||
#v = celery_app.control.inspect().query_task(t.id).objgraph()
|
|
||||||
#v = celery_app.control.inspect().stats()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user