flower-0.8.3/ 0000755 0000765 0000024 00000000000 12561016723 013101 5 ustar mher staff 0000000 0000000 flower-0.8.3/AUTHORS 0000644 0000765 0000024 00000001661 12561016565 014161 0 ustar mher staff 0000000 0000000 ==================================
AUTHORS (in chronological order)
==================================
Mher Movsisyan
Ask Solem
Lukasz Marcin Dobrzanski
Alexander Koshelev
Gary Linscott
Tommaso Barbugli
Miguel Gaiowski
Matt Hughes
Romain Commandé
Andres Riancho
Jet Zheung
Audrius Butkevicius
Yulian Slobodyan
Rob O'Dwyer
Horace Thomas
Kit Sunde
Adam Greig
Luciano Pacheco
Miki Tebeka
Michael J. Schultz
TJ Kells
Geoff Jukes
Peter De Vries
Sabeel Saif Hakim
Gaurav Dadhania
Charlie Marshall
Benjamin Drung
David Thorman
Hong Minhee
John Costa
Iuri de Silvio
Balthazar Rouberol
Alexandre Ferland
Florian Glesser
Tomasz Pazurkiewicz
Benjamin Toueg
Rob Hoelz
Tadej Janež
Corey Farwell
Thomas Grainger
Tom Mortimer-Jones
Konstantinos Koukopoulos
Samuel Cormier-Iijima
David Matson
Paulo SantAnna
Sanchit Arora
Ilya Lebedev
Wendy Liu
Mike Helmick
Ilya Georgievsky
Raghuram Onti Srinivasan
Michael Kahn
Gaurav Kumar
Simon Westphahl
Pedro Ferreira
flower-0.8.3/CHANGES 0000644 0000765 0000024 00000006546 12503641346 014110 0 ustar mher staff 0000000 0000000 Celery Flower
=============
Here you can see the full list of changes between each release.
Version 0.8
-----------
Released on March 22 2015
- Google OAuth 2.0 support
- tasks can be sorted by state, received and started times
- tasks can be filters by time range
- --conf option to change the default configuration file
- --enable_events option to disable periodic `enable_events` commands
- show time in natural format (e.g. 3 minutes ago)
- format_task option to filter out sensitive information
- exceptions are shown as a result for failed tasks
- performance improvements
- improvements in monitor page
- improvements in docs
- improvements in logging
- bug fixes
Version 0.7
-----------
Released on May 25 2014
- documentation
- --basic_auth option accepts multiple basic http auth users
- configuration options can be passed through `flowerconfig.py` file
- --cookie_secret option for setting secure cookie secret
- new task info api
- --auto_refresh option allows to disable dashboard auto-refreshes
- `received` and `started` time columns for tasks dashboard
- man page
Version 0.6
-----------
Released on Nov 10 2013
- Python 3 support
- SSL support
- new api docs
- UI improvements
- api error reporting and validation improvements
- tasks api accepts `async_apply` options
- --debug option sets logging level to DEBUG
- tasks in RETRY state can be revoked
- --xheaders option enables X-Real-Ip/X-Forwarded-For and X-Scheme/X-Forwarded-Proto headers
- monitor update interval can be changed with `updateInterval` url param
- --broker_api option is not required for Redis
Version 0.5
-----------
Released on Apr 23 2013
- broker monitor for RabbitMQ and Redis
- HTTP Basic Auth
- --auth option accepts an email regexp
- flower state can be saved with --persistent option
- database name can be changed with --db option
- number of in-memory tasks can be limited with --max_tasks option
- task runtime graph
- --url_prefix option allows to deploy flower on non-root URLs
- flower detects inactivity and stops inspecting workers
Version 0.4
-----------
Released on Oct 16 2012
- tasks can be invoked via REST API
- inspect timeout can be changed with --inspect_timeout option
- flower --address option allows to bind to specific IP address
- tasks can be filtered by state
- broker url is available on workers page
- long args/kwargs are truncated on tasks page
- Google OpenID authentication
Version 0.3
-----------
Released on Aug 14 2012
- flower --inspect option for disabling worker inspects
- websocket api for getting real-time task events
- real-time monitoring graphs for succeeded and failed tasks
- api for managing workers and tasks
- tasks can be revoked and terminated
- worker view shows autoscaler options
- worker view shows worker's PID
Version 0.2
-----------
Released on Jul 24 2012
- configuration viewer for each worker
- improves UI
- adds error pages
- warns about unsupported transports
- periodically enables events
Version 0.1
-----------
Released on Jul 09 2012
- workers dashboard with auto refresh
- worker pool control commands (restart, grow/shrink, autoscale)
- worker pool options viewer
- broker options viewer
- active queues options viewer
- consumer addition and cancellation
- processed tasks statistics
- active tasks viewer
- scheduled tasks viewer
- reserved tasks viewer
- task options viewer
- task limit control (rate limits, hard and soft timeouts)
flower-0.8.3/docs/ 0000755 0000765 0000024 00000000000 12561016723 014031 5 ustar mher staff 0000000 0000000 flower-0.8.3/docs/_static/ 0000755 0000765 0000024 00000000000 12561016723 015457 5 ustar mher staff 0000000 0000000 flower-0.8.3/docs/_templates/ 0000755 0000765 0000024 00000000000 12561016723 016166 5 ustar mher staff 0000000 0000000 flower-0.8.3/docs/_templates/localtoc.html 0000644 0000765 0000024 00000000222 12326704261 020650 0 ustar mher staff 0000000 0000000 {%- if display_toc %}
flower-0.8.3/docs/_theme/ 0000755 0000765 0000024 00000000000 12561016723 015272 5 ustar mher staff 0000000 0000000 flower-0.8.3/docs/_theme/celery/ 0000755 0000765 0000024 00000000000 12561016723 016555 5 ustar mher staff 0000000 0000000 flower-0.8.3/docs/_theme/celery/static/ 0000755 0000765 0000024 00000000000 12561016723 020044 5 ustar mher staff 0000000 0000000 flower-0.8.3/docs/_theme/celery/static/celery.css_t 0000644 0000765 0000024 00000015034 12326704261 022367 0 ustar mher staff 0000000 0000000 /*
* celery.css_t
* ~~~~~~~~~~~~
*
* :copyright: Copyright 2010 by Armin Ronacher.
* :license: BSD, see LICENSE for details.
*/
{% set page_width = 940 %}
{% set sidebar_width = 220 %}
{% set body_font_stack = 'Optima, Segoe, "Segoe UI", Candara, Calibri, Arial, sans-serif' %}
{% set headline_font_stack = 'Futura, "Trebuchet MS", Arial, sans-serif' %}
{% set code_font_stack = "'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace" %}
@import url("basic.css");
/* -- page layout ----------------------------------------------------------- */
body {
font-family: {{ body_font_stack }};
font-size: 17px;
background-color: white;
color: #000;
margin: 30px 0 0 0;
padding: 0;
}
div.document {
width: {{ page_width }}px;
margin: 0 auto;
}
div.deck {
font-size: 18px;
}
p.developmentversion {
color: red;
}
div.related {
width: {{ page_width - 20 }}px;
padding: 5px 10px;
background: #F2FCEE;
margin: 15px auto 15px auto;
}
div.documentwrapper {
float: left;
width: 100%;
}
div.bodywrapper {
margin: 0 0 0 {{ sidebar_width }}px;
}
div.sphinxsidebar {
width: {{ sidebar_width }}px;
}
hr {
border: 1px solid #B1B4B6;
}
div.body {
background-color: #ffffff;
color: #3E4349;
padding: 0 30px 0 30px;
}
img.celerylogo {
padding: 0 0 10px 10px;
float: right;
}
div.footer {
width: {{ page_width - 15 }}px;
margin: 10px auto 30px auto;
padding-right: 15px;
font-size: 14px;
color: #888;
text-align: right;
}
div.footer a {
color: #888;
}
div.sphinxsidebar a {
color: #444;
text-decoration: none;
border-bottom: 1px dashed #DCF0D5;
}
div.sphinxsidebar a:hover {
border-bottom: 1px solid #999;
}
div.sphinxsidebar {
font-size: 14px;
line-height: 1.5;
}
div.sphinxsidebarwrapper {
padding: 7px 10px;
}
div.sphinxsidebarwrapper p.logo {
padding: 0 0 20px 0;
margin: 0;
}
div.sphinxsidebar h3,
div.sphinxsidebar h4 {
font-family: {{ headline_font_stack }};
color: #444;
font-size: 24px;
font-weight: normal;
margin: 0 0 5px 0;
padding: 0;
}
div.sphinxsidebar h4 {
font-size: 20px;
}
div.sphinxsidebar h3 a {
color: #444;
}
div.sphinxsidebar p.logo a,
div.sphinxsidebar h3 a,
div.sphinxsidebar p.logo a:hover,
div.sphinxsidebar h3 a:hover {
border: none;
}
div.sphinxsidebar p {
color: #555;
margin: 10px 0;
}
div.sphinxsidebar ul {
margin: 10px 0;
padding: 0;
color: #000;
}
div.sphinxsidebar input {
border: 1px solid #ccc;
font-family: {{ body_font_stack }};
font-size: 1em;
}
/* -- body styles ----------------------------------------------------------- */
a {
color: #348613;
text-decoration: underline;
}
a:hover {
color: #59B833;
text-decoration: underline;
}
div.body h1,
div.body h2,
div.body h3,
div.body h4,
div.body h5,
div.body h6 {
font-family: {{ headline_font_stack }};
font-weight: normal;
margin: 30px 0px 10px 0px;
padding: 0;
}
div.body h1 { margin-top: 0; padding-top: 0; font-size: 200%; }
div.body h2 { font-size: 180%; }
div.body h3 { font-size: 150%; }
div.body h4 { font-size: 130%; }
div.body h5 { font-size: 100%; }
div.body h6 { font-size: 100%; }
div.body h1 a.toc-backref,
div.body h2 a.toc-backref,
div.body h3 a.toc-backref,
div.body h4 a.toc-backref,
div.body h5 a.toc-backref,
div.body h6 a.toc-backref {
color: inherit!important;
text-decoration: none;
}
a.headerlink {
color: #ddd;
padding: 0 4px;
text-decoration: none;
}
a.headerlink:hover {
color: #444;
background: #eaeaea;
}
div.body p, div.body dd, div.body li {
line-height: 1.4em;
}
div.admonition {
background: #fafafa;
margin: 20px -30px;
padding: 10px 30px;
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
div.admonition p.admonition-title {
font-family: {{ headline_font_stack }};
font-weight: normal;
font-size: 24px;
margin: 0 0 10px 0;
padding: 0;
line-height: 1;
}
div.admonition p.last {
margin-bottom: 0;
}
div.highlight{
background-color: white;
}
dt:target, .highlight {
background: #FAF3E8;
}
div.note {
background-color: #eee;
border: 1px solid #ccc;
}
div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}
div.topic {
background-color: #eee;
}
div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}
p.admonition-title {
display: inline;
}
p.admonition-title:after {
content: ":";
}
pre, tt {
font-family: {{ code_font_stack }};
font-size: 0.9em;
}
img.screenshot {
}
tt.descname, tt.descclassname {
font-size: 0.95em;
}
tt.descname {
padding-right: 0.08em;
}
img.screenshot {
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils {
border: 1px solid #888;
-moz-box-shadow: 2px 2px 4px #eee;
-webkit-box-shadow: 2px 2px 4px #eee;
box-shadow: 2px 2px 4px #eee;
}
table.docutils td, table.docutils th {
border: 1px solid #888;
padding: 0.25em 0.7em;
}
table.field-list, table.footnote {
border: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
table.footnote {
margin: 15px 0;
width: 100%;
border: 1px solid #eee;
background: #fdfdfd;
font-size: 0.9em;
}
table.footnote + table.footnote {
margin-top: -15px;
border-top: none;
}
table.field-list th {
padding: 0 0.8em 0 0;
}
table.field-list td {
padding: 0;
}
table.footnote td.label {
width: 0px;
padding: 0.3em 0 0.3em 0.5em;
}
table.footnote td {
padding: 0.3em 0.5em;
}
dl {
margin: 0;
padding: 0;
}
dl dd {
margin-left: 30px;
}
blockquote {
margin: 0 0 0 30px;
padding: 0;
}
ul {
margin: 10px 0 10px 30px;
padding: 0;
}
pre {
background: #F0FFEB;
padding: 7px 10px;
margin: 15px 0;
border: 1px solid #C7ECB8;
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
line-height: 1.3em;
}
tt {
background: #F0FFEB;
color: #222;
/* padding: 1px 2px; */
}
tt.xref, a tt {
background: #F0FFEB;
border-bottom: 1px solid white;
}
a.reference {
text-decoration: none;
border-bottom: 1px dashed #DCF0D5;
}
a.reference:hover {
border-bottom: 1px solid #6D4100;
}
a.footnote-reference {
text-decoration: none;
font-size: 0.7em;
vertical-align: top;
border-bottom: 1px dashed #DCF0D5;
}
a.footnote-reference:hover {
border-bottom: 1px solid #6D4100;
}
a:hover tt {
background: #EEE;
}
flower-0.8.3/docs/_theme/celery/theme.conf 0000644 0000765 0000024 00000000073 12326704261 020526 0 ustar mher staff 0000000 0000000 [theme]
inherit = basic
stylesheet = celery.css
[options]
flower-0.8.3/docs/api.ipynb 0000644 0000765 0000024 00000041202 12561016565 015650 0 ustar mher staff 0000000 0000000 {
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# flower REST API\n",
"\n",
"This document shows how to use the flower [REST API](https://github.com/mher/flower#api). \n",
"\n",
"We will use [requests](http://www.python-requests.org/en/latest/) for accessing the API. (See [here](http://www.python-requests.org/en/latest/user/install/) on how to install it.) "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Code\n",
"We'll use the following code throughout the documentation."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## tasks.py"
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"from celery import Celery\n",
"from time import sleep\n",
"\n",
"celery = Celery()\n",
"celery.config_from_object({\n",
" 'BROKER_URL': 'amqp://localhost',\n",
" 'CELERY_RESULT_BACKEND': 'amqp://',\n",
" 'CELERYD_POOL_RESTARTS': True, # Required for /worker/pool/restart API\n",
"})\n",
"\n",
"\n",
"@celery.task\n",
"def add(x, y):\n",
" return x + y\n",
"\n",
"\n",
"@celery.task\n",
"def sub(x, y):\n",
" sleep(30) # Simulate work\n",
" return x - y"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Running\n",
"You'll need a celery worker instance and a flower instance running. In one terminal window run\n",
"\n",
" celery worker --loglevel INFO -A proj -E --autoscale 10,3\n",
"\n",
"and in another terminal run\n",
"\n",
" celery flower -A proj"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Tasks API\n",
"The tasks API is *async*, meaning calls will return immediatly and you'll need to poll on task status."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Done once for the whole docs\n",
"import requests, json\n",
"api_root = 'http://localhost:5555/api'\n",
"task_api = '{}/task'.format(api_root)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## async-apply"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/task/async-apply/tasks.add\n"
]
},
{
"data": {
"text/plain": [
"{u'state': u'PENDING', u'task-id': u'f4a53407-30f3-42af-869f-b7f8f4fbd684'}"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"args = {'args': [1, 2]}\n",
"url = '{}/async-apply/tasks.add'.format(task_api)\n",
"print(url)\n",
"resp = requests.post(url, data=json.dumps(args))\n",
"reply = resp.json()\n",
"reply"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can see that we created a new task and it's pending. Note that the API is *async*, meaning it won't wait until the task finish."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## apply"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For create task and wait results you can use 'apply' API."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/task/apply/tasks.add\n"
]
},
{
"data": {
"text/plain": [
"{u'result': 3,\n",
" u'state': u'SUCCESS',\n",
" u'task-id': u'ced6fd57-419e-4b8e-8d99-0770be717cb4'}"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"args = {'args': [1, 2]}\n",
"url = '{}/apply/tasks.add'.format(task_api)\n",
"print(url)\n",
"resp = requests.post(url, data=json.dumps(args))\n",
"reply = resp.json()\n",
"reply"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## result\n",
"Gets the task result. This is *async* and will return immediatly even if the task didn't finish (with state 'PENDING')"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/task/result/ced6fd57-419e-4b8e-8d99-0770be717cb4\n"
]
},
{
"data": {
"text/plain": [
"{u'result': 3,\n",
" u'state': u'SUCCESS',\n",
" u'task-id': u'ced6fd57-419e-4b8e-8d99-0770be717cb4'}"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = '{}/result/{}'.format(task_api, reply['task-id'])\n",
"print(url)\n",
"resp = requests.get(url)\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## revoke\n",
"Revoke a running task."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/task/revoke/bcb4ac2e-cb2d-4a4b-a402-8eb3a3b0c8e8\n"
]
},
{
"data": {
"text/plain": [
"{u'message': u\"Revoked 'bcb4ac2e-cb2d-4a4b-a402-8eb3a3b0c8e8'\"}"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Run a task\n",
"args = {'args': [1, 2]}\n",
"resp = requests.post('{}/async-apply/tasks.sub'.format(task_api), data=json.dumps(args))\n",
"reply = resp.json()\n",
"\n",
"# Now revoke it\n",
"url = '{}/revoke/{}'.format(task_api, reply['task-id'])\n",
"print(url)\n",
"resp = requests.post(url, data='terminate=True')\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## rate-limit\n",
"Update [rate limit](http://docs.celeryproject.org/en/latest/userguide/tasks.html#Task.rate_limit) for a task."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/task/rate-limit/miki-manjaro\n"
]
},
{
"data": {
"text/plain": [
"{u'message': u'new rate limit set successfully'}"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"worker = 'miki-manjaro' # You'll need to get the worker name from the worker API (seel below)\n",
"url = '{}/rate-limit/{}'.format(task_api, worker)\n",
"print(url)\n",
"resp = requests.post(url, params={'taskname': 'tasks.add', 'ratelimit': '10'})\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## timeout\n",
"Set timeout (both [hard](http://docs.celeryproject.org/en/latest/userguide/tasks.html#Task.time_limit) and [soft](http://docs.celeryproject.org/en/latest/userguide/tasks.html#Task.soft_time_limit)) for a task."
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false,
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/task/timeout/miki-manjaro\n"
]
},
{
"data": {
"text/plain": [
"{u'message': u'time limits set successfully'}"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = '{}/timeout/{}'.format(task_api, worker)\n",
"print(url)\n",
"resp = requests.post(url, params={'taskname': 'tasks.add', 'hard': '3.14', 'soft': '3'}) # You can omit soft or hard\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Worker API"
]
},
{
"cell_type": "code",
"execution_count": 55,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Once for the documentation\n",
"worker_api = '{}/worker'.format(api_root)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## workers\n",
"List workers."
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/workers\n"
]
},
{
"data": {
"text/plain": [
"{u'miki-manjaro': {u'completed_tasks': 0,\n",
" u'concurrency': 1,\n",
" u'queues': [u'celery'],\n",
" u'running_tasks': 0,\n",
" u'status': True}}"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = '{}/workers'.format(api_root) # Only one not under /worker\n",
"print(url)\n",
"resp = requests.get(url)\n",
"workers = resp.json()\n",
"workers"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## pool/shutdown\n",
"Shutdown a worker."
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/worker/shutdown/miki-manjaro\n"
]
},
{
"data": {
"text/plain": [
"{u'message': u'Shutting down!'}"
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"worker = workers.keys()[0]\n",
"url = '{}/shutdown/{}'.format(worker_api, worker)\n",
"print(url)\n",
"resp = requests.post(url)\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## pool/restart\n",
"Restart a worker pool, you need to have [CELERYD_POOL_RESTARTS](http://docs.celeryproject.org/en/latest/configuration.html#std:setting-CELERYD_POOL_RESTARTS) enabled in your configuration)."
]
},
{
"cell_type": "code",
"execution_count": 43,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/worker/pool/restart/miki-manjaro\n"
]
},
{
"data": {
"text/plain": [
"{u'message': u\"Restarting 'miki-manjaro' worker's pool\"}"
]
},
"execution_count": 43,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pool_api = '{}/pool'.format(worker_api)\n",
"url = '{}/restart/{}'.format(pool_api, worker)\n",
"print(url)\n",
"resp = requests.post(url)\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## pool/grow\n",
"Grows worker pool."
]
},
{
"cell_type": "code",
"execution_count": 53,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/worker/pool/grow/miki-manjaro\n"
]
},
{
"data": {
"text/plain": [
"{u'message': u\"Growing 'miki-manjaro' worker's pool\"}"
]
},
"execution_count": 53,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = '{}/grow/{}'.format(pool_api, worker)\n",
"print(url)\n",
"resp = requests.post(url, params={'n': '10'})\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## pool/shrink\n",
"Shrink worker pool."
]
},
{
"cell_type": "code",
"execution_count": 54,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/worker/pool/shrink/miki-manjaro\n"
]
},
{
"data": {
"text/plain": [
"{u'message': u\"Shrinking 'miki-manjaro' worker's pool\"}"
]
},
"execution_count": 54,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = '{}/shrink/{}'.format(pool_api, worker)\n",
"print(url)\n",
"resp = requests.post(url, params={'n': '3'})\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## pool/autoscale\n",
"[Autoscale](http://docs.celeryproject.org/en/latest/userguide/workers.html#autoscaling) a pool."
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/worker/pool/autoscale/miki-manjaro\n"
]
},
{
"data": {
"text/plain": [
"{u'message': u\"Autoscaling 'miki-manjaro' worker\"}"
]
},
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = '{}/autoscale/{}'.format(pool_api, worker)\n",
"print(url)\n",
"resp = requests.post(url, params={'min': '3', 'max': '10'})\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## queue/add-consumer\n",
"[Add a consumer](http://docs.celeryproject.org/en/latest/userguide/workers.html#std:control-add_consumer) to a queue."
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/worker/queue/add-consumer/miki-manjaro\n"
]
},
{
"data": {
"text/plain": [
"{u'message': u\"add consumer u'jokes'\"}"
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"queue_api = '{}/queue'.format(worker_api)\n",
"url = '{}/add-consumer/{}'.format(queue_api, worker)\n",
"print(url)\n",
"resp = requests.post(url, params={'queue': 'jokes'})\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## queue/cancel-consumer\n",
"[Cancel a consumer](http://docs.celeryproject.org/en/latest/userguide/workers.html#queues-cancelling-consumers) queue."
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/worker/queue/cancel-consumer/miki-manjaro\n"
]
},
{
"data": {
"text/plain": [
"{u'message': u'no longer consuming from jokes'}"
]
},
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = '{}/cancel-consumer/{}'.format(queue_api, worker)\n",
"print(url)\n",
"resp = requests.post(url, params={'queue': 'jokes'})\n",
"resp.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Queue API\n",
"\n",
"We assume that we've two queues; the default one 'celery' and 'all'"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"http://localhost:5555/api/queues/length\n"
]
},
{
"data": {
"text/plain": [
"{u'active_queues': [{u'messages': 2, u'name': u'all'},\n",
" {u'messages': 1, u'name': u'celery'}]}"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"url = '{}/queues/length'.format(api_root)\n",
"print(url)\n",
"resp = requests.get(url)\n",
"resp.json()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
flower-0.8.3/docs/api.rst 0000644 0000765 0000024 00000000141 12326704261 015330 0 ustar mher staff 0000000 0000000 API Reference
=============
.. toctree::
:maxdepth: 2
.. autotornado:: flower.app:Flower()
flower-0.8.3/docs/auth.rst 0000644 0000765 0000024 00000005220 12561016565 015527 0 ustar mher staff 0000000 0000000 Authentication
==============
Protecting your Flower instance from unwarranted access is important
if it runs in an untrusted environment. Below, we outline the various
forms of authentication supported by Flower.
.. _basic-auth:
HTTP Basic Authentication
-------------------------
Securing Flower with Basic Authentication is easy.
The `--basic_auth` option accepts `user:password` pairs separated by
semicolons. If configured, any client trying to access this
Flower instance will be prompted to provide the credentials specified in
this argument: ::
$ celery flower --basic_auth=user1:password1,user2:password2
See also :ref:`reverse-proxy`
.. _google-oauth:
Google OAuth 2.0
----------------
Flower supports Google OAuth 2.0. This way you can authenticate any user
with a Google account. Google OAuth 2.0 authentication is enabled using the
`--auth`, `--oauth2_key`, `--oauth2_secret` and `--oauth2_redirect_uri` options.
`--auth` is a regular expression, for granting access only to the specified email pattern.
`--oauth2_key` and `--oauth2_secret` are your credentials from your `Google Developer Console`_.
`--oauth2_redirect_uri` is there to specify what is the redirect_uri associated to you key and secret
For instance, if you want to grant access to `me@gmail.com` and `you@gmail.com`: ::
$ celery flower --auth="me@gmail.com|you@gmail.com" --oauth2_key=... --oauth2_secret=... --oauth2_redirect_uri=http://flower.example.com/login
Alternatively you can set environment variables instead of command line arguments: ::
$ export FLOWER_OAUTH2_KEY=...
$ export FLOWER_OAUTH2_SECRET=...
$ export FLOWER_OAUTH2_REDIRECT_URI=http://flower.example.com/login
$ celery flower --auth=.*@example\.com
.. _Google Developer Console: https://console.developers.google.com
.. _github-oauth:
GitHub OAuth
------------
Flower also supports GitHub OAuth. Flower should be registered in
before getting started.
See `GitHub OAuth API`_ docs for more info.
GitHub OAuth should be activated using `--auth_provider` option.
The client id, secret and redirect uri should be provided using
`--oauth2_key`, `--oauth2_secret` and `--oauth2_redirect_uri` options or using
`FLOWER_OAUTH2_KEY`, `FLOWER_OAUTH2_SECRET` and `FLOWER_OAUTH2_REDIRECT_URI`
environment variables.: ::
$ export FLOWER_OAUTH2_KEY=7956724aafbf5e1a93ac
$ export FLOWER_OAUTH2_SECRET=f9155f764b7e466c445931a6e3cc7a42c4ce47be
$ export FLOWER_OAUTH2_REDIRECT_URI=http://localhost:5555/login
$ celery flower --auth_provider=flower.views.auth.GithubLoginHandler --auth=.*@example\.com
.. _GitHub OAuth API: https://developer.github.com/v3/oauth/
flower-0.8.3/docs/conf.py 0000644 0000765 0000024 00000021216 12561016565 015336 0 ustar mher staff 0000000 0000000 # -*- coding: utf-8 -*-
#
# flower documentation build configuration file, created by
# sphinx-quickstart on Fri Apr 11 17:26:01 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
sys.path.insert(0, os.path.abspath('..'))
import flower
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.intersphinx',
'sphinxcontrib.fulltoc',
'sphinxcontrib.httpdomain',
'sphinxcontrib.autohttp.tornado',
]
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'Flower'
copyright = u'2015, Mher Movsisyan'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '.'.join(map(str, flower.VERSION[0:2]))
# The full version, including alpha/beta/rc tags.
release = flower.__version__.rstrip('-dev')
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
# today = ''
# Else, today_fmt is used as the format for a strftime call.
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['.build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'celery'
html_theme_path = ['_theme']
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# " v documentation".
# html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
# html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
# html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
# html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
html_sidebars = {
'index': ['sidebarintro.html', 'sourcelink.html', 'searchbox.html'],
'**': ['sidebarlogo.html', 'localtoc.html', 'relations.html',
'sourcelink.html', 'searchbox.html']
}
# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
# If false, no module index is generated.
html_domain_indices = False
# If false, no index is generated.
html_use_index = False
# If true, the index is split into individual pages for each letter.
# html_split_index = False
# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
html_show_sphinx = False
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'flowerdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
# ' pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
# 'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(
'index',
'flower.tex',
u'flower Documentation',
u'Mher Movsisyan',
'manual'
),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False
# If true, show page references after internal links.
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
# latex_show_urls = False
# Documents to append as an appendix to all manuals.
# latex_appendices = []
# If false, no module index is generated.
# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('man', 'flower', u'flower Documentation',
[u'Mher Movsisyan'], 1)
]
# If true, show URL addresses after external links.
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
'index',
'flower',
u'flower Documentation',
u'Mher Movsisyan',
'flower',
'One line description of project.',
'Miscellaneous'
),
]
# Documents to append as an appendix to all manuals.
# texinfo_appendices = []
# If false, no module index is generated.
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
# texinfo_no_detailmenu = False
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'http://docs.python.org/': None}
flower-0.8.3/docs/config.rst 0000644 0000765 0000024 00000011537 12561016565 016043 0 ustar mher staff 0000000 0000000 :tocdepth: 2
Configuration
=============
Flower can be configured from the command line: ::
$ flower --auto_refresh=False
Using :file:`flowerconfig.py` configuration file:
.. code-block:: python
# Broker settings
BROKER_URL = 'amqp://guest:guest@localhost:5672//'
# RabbitMQ management api
broker_api = 'http://guest:guest@localhost:15672/api/'
# Enable debug logging
logging = 'DEBUG'
Or, using the environment variables. All flower options should be
prefixed with `FLOWER_`::
$ export FLOWER_BASIC_AUTH=foo:bar
Options passed through the command line have precedence over the options
defined in the configuration file. The configuration file name and path
can be changed with `conf`_ option.
Options
-------
Standard Celery configuration settings can be overridden in the configuration
file. See `Celery Configuration reference`_ for a complete listing of all
the available settings, and their default values.
.. _`Celery Configuration reference`: http://docs.celeryproject.org/en/latest/configuration.html#configuration
Celery command line options also can be passed to Flower. For example
the `--broker` sets the default broker url: ::
$ flower -A proj --broker=amqp://guest:guest@localhost:5672//
For a full list of options see: ::
$ celery --help
.. contents::
:local:
:depth: 1
.. _address:
address
~~~~~~~
Run the http server on a given address
.. _auth:
auth
~~~~
Enables Google OpenID authentication. `auth` is a regexp of emails
to grant access. For more info see :ref:`google-openid`
.. _auto_refresh:
auto_refresh
~~~~~~~~~~~~
Refresh dashboards automatically (by default, `auto_refresh=True`)
.. _basic_auth:
basic_auth
~~~~~~~~~~
Enables HTTP Basic authentication. `basic_auth` is a comma separated list
of `username:passworrd`. See :ref:`basic-auth` for more info.
.. _broker_api:
broker_api
~~~~~~~~~~
Flower uses `RabbitMQ Managment Plugin`_ to get info about queues.
`broker_api` is a URL of RabbitMQ HTTP API including user credentials. ::
$ flower -A proj --broker_api=http://username:password@rabbitmq-server-name:15672/api/
.. Note:: By default the managment plugin is not enabled. To enable it run::
$ rabbitmq-plugins enable rabbitmq_management
.. Note:: The port number for RabbitMQ versions prior to 3.0 is 55672.
.. _`RabbitMQ Managment Plugin`: https://www.rabbitmq.com/management.html
.. _ca_certs:
ca_certs
~~~~~~~~
A path to `ca_certs` file. The `ca_certs` file contains a set of concatenated “certification authority”
certificates, which are used to validate certificates passed from the other end of the connection.
For more info see :ref:`Python SSL`_
.. _`Python SSL`: https://docs.python.org/3.4/library/ssl.html
.. _certfile:
certfile
~~~~~~~~
A path to SSL certificate file
.. _conf:
conf
~~~~
A path to the configuration file (by default, :file:`flowerconfig.py`)
.. _db:
db
~~
A database file to use if persistent mode is enabled
(by default, `db=flower`)
.. _debug:
debug
~~~~~
Enable the debug mode (by default, `debug=False`)
.. _enable_events:
enable_events
~~~~~~~~~~~~~
Periodically enable Celery events by using `enable_events` command
(by default, `enable_event=True`)
.. _format_task:
format_task
~~~~~~~~~~~
Modifies the default task formatting. `format_task` function should be
defined in the `flowerconfig.py` configuration file. It accepts a task
object and returns the modified version.
`format_task` is useful for filtering out sensitive information.
The example below shows how to filter arguments and limit display lengths:
.. code-block:: python
from flower.utils.template import humanize
def format_task(task):
task.args = humanize(task.args, length=10)
task.kwargs.pop('credit_card_number')
task.result = humanize(task.result, length=20)
return task
.. _inspect_timeout:
inspect_timeout
~~~~~~~~~~~~~~~
Sets worker inspect timeout (by default, `inspect_timeout=10000`
in milliseconds)
.. _keyfile:
keyfile
~~~~~~~
A path to SSL key file
.. _max_tasks:
max_tasks
~~~~~~~~~
Maximum number of tasks to keep in memory (by default, `max_tasks=10000`)
.. _natural_time:
natural_time
~~~~~~~~~~~~
Show time relative to the refresh time (by default, `natural_time=True`)
.. _persistent:
persistent
~~~~~~~~~~
Enable persistent mode. If the persistent mode is enabled Flower saves
the current state and reloads on restart (by default, `persistent=False`)
.. _port:
port
~~~~
Run the http server on a given port (by default, `port=5555`)
.. _xheaders:
xheaders
~~~~~~~~
Enable support of `X-Real-Ip` and `X-Scheme` headers
(by default, `xheaders=False`)
tasks_columns
~~~~~~~~~~~~~
Specifies list of comma-delimited columns on /tasks/ page.
Order of slugs in the option is unrelated to order of columns on the page.
Available slugs: `name`, `uuid`, `state`, `args`, `kwargs`,
`result`, `received`, `started`, `runtime`
flower-0.8.3/docs/docker.rst 0000644 0000765 0000024 00000000476 12326704261 016041 0 ustar mher staff 0000000 0000000 Docker Usage
============
Clone this repository, build flower from the Dockerfile, start the
container and open http://localhost:49555 ::
$ docker build -t "flower" .
$ docker run -d -p=49555:5555 flower flower --port=5555
For more information about running with Docker see
http://docs.docker.io/en/latest/
flower-0.8.3/docs/features.rst 0000644 0000765 0000024 00000001416 12326704261 016403 0 ustar mher staff 0000000 0000000 Features
--------
- Real-time monitoring using Celery Events
- Task progress and history
- Ability to show task details (arguments, start time, runtime, and more)
- Graphs and statistics
- Remote Control
- View worker status and statistics
- Shutdown and restart worker instances
- Control worker pool size and autoscale settings
- View and modify the queues a worker instance consumes from
- View currently running tasks
- View scheduled tasks (ETA/countdown)
- View reserved and revoked tasks
- Apply time and rate limits
- Configuration viewer
- Revoke or terminate tasks
- Broker monitoring
- View statistics for all Celery queues
- Queue length graphs
- HTTP API
- Basic Auth and Google OpenID authentication
flower-0.8.3/docs/index.rst 0000644 0000765 0000024 00000001022 12561016565 015671 0 ustar mher staff 0000000 0000000 ===============================
Flower - Celery monitoring tool
===============================
Flower is a web based tool for monitoring and administrating `Celery`_ clusters
.. _Celery: http://celeryproject.org
.. include:: features.rst
Contents
========
.. toctree::
:maxdepth: 2
features
screenshots
install
config
tasks_filter
api
auth
reverse-proxy
docker
Flower is Open Source and licensed under the `BSD License`_.
.. _`BSD License`: http://www.opensource.org/licenses/BSD-3-Clause
flower-0.8.3/docs/install.rst 0000644 0000765 0000024 00000001116 12510076510 016222 0 ustar mher staff 0000000 0000000 Installation
============
Installing `flower` with `pip `_ is simple ::
$ pip install flower
Or, with `easy_install `_ ::
$ easy_install flower
Usage
-----
Launch the server and open http://localhost:5555: ::
$ flower -A proj --port=5555
Or, launch from Celery: ::
$ celery flower -A proj --address=127.0.0.1 --port=5555
Broker URL and other configuration options can be passed through the standard Celery options: ::
$ celery flower -A proj --broker=amqp://guest:guest@localhost:5672//
flower-0.8.3/docs/Makefile 0000644 0000765 0000024 00000015152 12326704261 015475 0 ustar mher staff 0000000 0000000 # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = .build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/flower.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/flower.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/flower"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/flower"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
flower-0.8.3/docs/man.rst 0000644 0000765 0000024 00000007327 12510076510 015341 0 ustar mher staff 0000000 0000000 ========
flower
========
SYNOPSIS
========
``flower`` [*OPTIONS*]
DESCRIPTION
===========
Flower is a web based tool for monitoring and administrating Celery clusters.
It has these features:
- Real-time monitoring using Celery Events
- Task progress and history
- Ability to show task details (arguments, start time, runtime, and more)
- Graphs and statistics
- Remote Control
- View worker status and statistics
- Shutdown and restart worker instances
- Control worker pool size and autoscale settings
- View and modify the queues a worker instance consumes from
- View currently running tasks
- View scheduled tasks (ETA/countdown)
- View reserved and revoked tasks
- Apply time and rate limits
- Configuration viewer
- Revoke or terminate tasks
- Broker monitoring
- View statistics for all Celery queues
- Queue length graphs
- HTTP API
- Basic Auth and Google OpenID authentication
OPTIONS
=======
--address run on the given address
--auth regexp of emails to grant access
--basic_auth colon separated user-password to enable
basic auth
--broker_api inspect broker e.g.
http://guest:guest@localhost:15672/api/
--certfile path to SSL certificate file
--db flower database file (default *flower.db*)
--debug run in debug mode (default *False*)
--help show this help information
--inspect inspect workers (default *True*)
--inspect_timeout inspect timeout (in milliseconds) (default
*1000*)
--keyfile path to SSL key file
--max_tasks maximum number of tasks to keep in memory
(default *10000*)
--persistent enable persistent mode (default *False*)
--port run on the given port (default *5555*)
--url_prefix base url prefix
--xheaders enable support for the 'X-Real-Ip' and
'X-Scheme' headers. (default *False*)
TORNADO OPTIONS
===============
--log_file_max_size max size of log files before rollover
(default *100000000*)
--log_file_num_backups number of log files to keep (default *10*)
--log_file_prefix=PATH Path prefix for log files. Note that if you
are running multiple tornado processes,
log_file_prefix must be different for each
of them (e.g. include the port number)
--log_to_stderr Send log output to stderr (colorized if
possible). By default use stderr if
``--log_file_prefix`` is not set and no other
logging is configured.
--logging=debug|info|warning|error|none
Set the Python log level. If *none*, tornado
won't touch the logging configuration.
(default *info*)
USAGE
=====
Launch the server and open http://localhost:5555: ::
$ flower -A proj --port=5555
Or, launch from Celery: ::
$ celery flower -A proj --address=127.0.0.1 --port=5555
Broker URL and other configuration options can be passed through the standard Celery options: ::
$ celery flower -A proj --broker=amqp://guest:guest@localhost:5672//
flower-0.8.3/docs/reverse-proxy.rst 0000644 0000765 0000024 00000001773 12326704261 017425 0 ustar mher staff 0000000 0000000 .. _reverse-proxy:
Running behind reverse proxy
============================
To run `Flower` behind a reverse proxy, remember to set the correct `Host`
header to the request to make sure Flower can generate correct URLs.
The following is a minimal `nginx` configuration:
.. code-block:: nginx
server {
listen 80;
server_name flower.example.com;
charset utf-8;
location / {
proxy_pass http://localhost:5555;
proxy_set_header Host $host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Note that you should not expose this site to the public internet without
any sort of authentication! If you have a `htpasswd` file with user
credentials you can make `nginx` use this file by adding the following
lines to the location block:
.. code-block:: nginx
auth_basic "Restricted";
auth_basic_user_file htpasswd;
flower-0.8.3/docs/screenshots/ 0000755 0000765 0000024 00000000000 12561016723 016371 5 ustar mher staff 0000000 0000000 flower-0.8.3/docs/screenshots/broker.png 0000644 0000765 0000024 00000211242 12324702473 020366 0 ustar mher staff 0000000 0000000 PNG
IHDR 🚾 iCCPICC Profile XY 8ן˵]ى=KH%ZH"J!k"$%d)JByy̙3gΜwUKRL
\\p 0yOT% 6;,L~Q> @ Cp-
̦<ԈM|
,DAl_a{[<v OG&S "t D= XpߠpU :>d_ =8$'+Le"BqOs%,4|H
@lb}@@?sozSaF~mOE8#!{,6;6fFO/j|oK_?#c#^PC4LޱN#Sւ n++T[sZ^ޟbb/Emwk.j/(F* dxLREn42@۴D,~U L P`
K`~=i}T ßL-9f/>|?A柵J#]'~Ko*i?b1k5Jn:Q-G&T=@5Pݨ_f!
ekȌ~ zW(/o*
AഥuпIF7")?C6@k#vFlfCsY6h]dT῎-[l%|@p/{"(AT}0PRPTgW{nL؞F6A+ 4AB^ :f|)1h~NJ@h=`v \nĺ x/H S8
A1(W
P@ ]<#`L0p"A?$
ICJ:C
yAP8
%@P:.Au6=h-(fya1XVaH8NOp|[.9<(EQ(u!GQPPiTՈ j5ƢIh,fhG:} >.GסosuÃhb1. ^L*&SiG w,ˆǪ!
f`ck}wEljilpd]5qxZ^ owÇ9J=|?~BH#JIcCKGs)
N&8 \B50JՠID{6C7?NЕݧ{A7O$ňzD7"xXAl#"'ћϧ@ ʠϰ!!&SYFF1FCF2|یCL$&E&0JGLS8f1fcf_b6w$IdH!%JH ,89K0K:U9VfmNwYPlblll'n
-cfg_Hxα)iY9ƅɵW;,7w
<0>bnE^>^S<6Y>6>=`l{|$~ lfy/ 9
% Յ[DEDDD^҈]s;"V/6%!n./^%>*AЕ(x&T+KHJK=UK`d4dedddecddȱY%}wϔ_WPQU(QQdVܡبMIJG)_2QDrm]6BRR9ҪJQVVQR+PRgQUP08ѤSSUyCVVv~K&k_ҹ3+K-}'W7/E~F(#S4cfcGsƯLLLLLUL7ØYe
WP۱:{so-,)VV֢6͘m흝؝;w~SK'{Ww0p80(Tl<"ߥ˕5ȵ
V궸xי]*vs}דyUJ!ͽ|}fNieMkgOh
2:5,0x)&,d#9&v;9<$={"#R##5#DQ,(QPGT r%GщɏiX8cq&kMLHLx_8dz<$I!)+i!917PʻæRS)CGE
:sLXޱ4ߴ
9>+=qDIՓNaO,bʊzwt]@vZ3r%>;kې'w*o\5<
¢w0pbKĊr1JJ:/_(*M/]+//+PVQQSy
~ՆjK5l5k{]aqZڂ[[iuP]\\}`xkC[oݑS$ؔ{{)6Gܟm hy:=;L::;j?lzc]]u*ݷ<գSTiCFoc{-F̟u=~788<>4>;<"ח1/WFbFr^*z-f\u7oߎy7>D⇜IɊ)iޏ>ND̬̦~bTYs/s.s_)_7esΗ-l[h]]|=R?v.;/O]ŭI5[nmlD)P ToeH
wA!