title: monitor celery queue pending tasks with or without flower
body: <p>I am trying to monitor celery queue so that if no of tasks increases in a queue i can chose to spawn more worker.</p>
  
  <p>How can i do this with or without Flower(the celery monitoring tool)</p>
  
  <p>eg: I can get a list of all the workers like this</p>
  
  <pre><code>curl -X GET http://localhost:5555/api/workers
  
  {
      "celery@ip-172-0-0-1": {
          "status": true,
          "queues": [
              "tasks"
          ],
          "running_tasks": 0,
          "completed_tasks": 0,
          "concurrency": 1
      },
      "celery@ip-172-0-0-2": {
          "status": true,
          "queues": [
              "tasks"
          ],
          "running_tasks": 0,
          "completed_tasks": 5,
          "concurrency": 1
      },
      "celery@ip-172-0-0-3": {
          "status": true,
          "queues": [
              "tasks"
          ],
          "running_tasks": 0,
          "completed_tasks": 5,
          "concurrency": 1
      }
  }
  </code></pre>
  
  <p>similarly i need a list of tasks pending by queue name so i can start a worker on that queue.</p>
  
  <p>Thanks for not down voting this question.</p>