1

I use flower to monitoring celery functions but if the result string is long, flower doesn't display all of it.

When I send request with python to flower, the result is the same, result is still not complete.

 {'Name': {21: {'state': 'open', 'reason': 'syn-ack', 'name': 'ftp', 'product': 'vsftpd', 'version': '2.3.4', 'extrainfo': '', 'conf': '10', 'cpe': 'cpe:/a:vsftpd:vsftpd:2.3.4'}, 22: {'state': 'open', 'reason': 'syn-ack', 'name': 'ssh', 'product': 'OpenSSH', 'version': '4.7p1 Debian 8ubuntu1', 'extrainfo': 'protocol 2.0', 'conf': '10', 'cpe': 'cpe:/o:linux:linux_kernel'}, 23: {'state': 'open', 'reason': 'syn-ack', 'name': 'telnet', 'product': 'Linux telnetd', 'version': '', 'extrainfo': '', 'conf': '10', 'cpe': 'cpe:/o:linux:linux_kernel'}, 25: {'state': 'open', 'reason': 'syn-ack', 'name': 'smtp', 'product': 'Postfix smtpd', 'version': '', 'extrainfo': '', 'conf': '10', 'cpe': 'cpe:/a:postfix:postfix'}, 53: {'state': 'open', 'reason': 'syn-ack', 'name': 'domain', 'product': 'ISC BIND', 'version': '9.4.2', 'extrainfo': '', 'conf': '10', 'cpe': 'cpe:/a:isc:bind:9.4.2', 'script': {...}}, 80: {'state': 'open', 'reason': 'syn-ack', 'name': 'http', 'product': 'Apache httpd', 'version': '2.2.8', 'extrainfo': '(Ubuntu...', ...}}}

Update: I did what you said @sp1rs, I set resultrepr_maxsize very high number but json that I got still doesn't bring some parts such as 'script' . It still shows {...}. I can't copy-paste it here because too long but I can take a photo. You can see that 'script' key doesn't have the result. (3. line) ibb.co/G0YShMK

In addition to that, if I get the function result with get() function in the python shell, 'script' keys and values come safely but flower doesn't bring them. Any idea?

quywter
  • 57
  • 6

1 Answers1

1

Flower is just the dashboard and will display what celery gives to it. For performance issue celery limit the length of task result.

https://docs.celeryproject.org/en/latest/reference/celery.app.task.html#celery.app.task.Task.resultrepr_maxsize

by default resultrepr_maxsize = 1024. Change the resultrepr_maxsize value to increase the length of your final result.

sp1rs
  • 786
  • 8
  • 23
  • I did what you said, I set resultrepr_maxsize very high number but json that I got still doesn't bring some parts such as 'script' . It still shows {...}. I can't copy-paste it here because too long but I can take a photo. You can see that 'script' key doesn't have the result. (3. line) https://ibb.co/G0YShMK – quywter Sep 18 '19 at 07:49
  • In addition to that, if I get the function result with get() function in the python shell, 'script' keys and values come safely but flower doesn't bring them. Any idea? – quywter Sep 18 '19 at 08:25
  • It is the same story... Flower does not want to spam with enormous results. And it DOES make sense! – DejanLekic Sep 18 '19 at 09:28
  • So how can I get the full result using flower api? – quywter Sep 18 '19 at 09:29