mher / flower

Real-time monitor and web admin for Celery distributed task queue

Home Page:https://flower.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tasks API "options" is incorrectly documented

drewsilcock opened this issue · comments

Describe the bug
The document for the tasks endpoints incorrectly documents the "options" optional parameters.

If you look at the endpoints in flower/api/tasks.py, specifically the BaseTaskHandler.get_task_args() method, you can see that all properties in the input body (other than "args" and "kwargs") are passed directly to the function invoking the task (either apply(), apply_async() or send_task()).

The documentation for the /api/task/apply/(.+) and /api/task/send-task/(.+) endpoints don't mention this feature at all, while the /api/task/async-apply/(.+) endpoint incorrectly states that the "options" property should contain the options whereas actually, the options are taken from the root level of the input JSON object.

I don't know how to document "all the other params" using the documentation generator, but a simple comment in the body of the endpoint description stating "all other parameters in the input body are passed directly onto the task invocation method" would do the trick.

To Reproduce
N/A

Expected behavior
The documentation accurately describes how input data is passed onto task invocation.

Screenshots
N/A

System information
N/A