姜果芹菜花

django-flower的Python项目详细描述


flower是一个基于web的工具,用于监视和管理芹菜集群。

功能

  • 使用芹菜事件进行实时监控

    • Task progress and history
    • Ability to show task details (arguments, start time, runtime, and more)
    • Graphs and statistics
  • 遥控器

    • 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
  • 经纪人监控

    • View statistics for all Celery queues
    • Queue length graphs
  • http api

  • 基本身份验证和Google OpenID身份验证

API(待办事项)

flower api允许通过restapi管理集群、调用任务和 通过websockets实时接收任务事件。

例如,您可以通过以下方式重新启动工作池:

$ curl -X POST http://localhost:5555/api/worker/pool/restart/myworker

或通过以下方式调用任务:

$ curl -X POST -d '{"args":[1,2]}' http://localhost:5555/api/task/async-apply/tasks.add

或终止执行任务:

$ curl -X POST -d 'terminate=True' http://localhost:5555/api/task/revoke/8a4da87b-e12b-4547-b89a-e92e4d1f8efd

或实时接收任务完成事件:

varws=newWebSocket('ws://localhost:5555/api/task/events/task-succeeded/');ws.onmessage=function(event){console.log(event.data);}

有关详细信息,请签出API Referenceexamples

要求

  • django>;=1.11.222
  • 芹菜=4.3
  • Jinja2=2.10.1

安装

PYPI版本:

$ pip install django-flower

开发版本:

$ pip install https://github.com/alexsilva/django-flower/zipball/master

用法

将app flower添加到django安装的应用程序:

INSTALLED_APPS = [
    ...
    'flower'
]

运行事件命令:

$ python manage flower_events

文档

需要在sample project中配置的所有内容

flower_events-是作为后端的django命令,应该在后台运行。

django设置变量:

FLOWER_RPC_HOST
FLOWER_RPC_PORT
FLOWER_INSPECT_TIMEOUT
FLOWER_AUTH
FLOWER_BASIC_AUTH
FLOWER_OAUTH2_KEY
FLOWER_OAUTH2_SECRET
FLOWER_OAUTH2_REDIRECT_URI
FLOWER_MAX_WORKERS
FLOWER_MAX_TASKS
FLOWER_DB
FLOWER_PERSISTENT
FLOWER_BROKER_API
FLOWER_CA_CERTS
FLOWER_CERTFILE
FLOWER_KEYFILE
FLOWER_XHEADERS
FLOWER_AUTO_REFRESH
FLOWER_COOKIE_SECRET
FLOWER_ENABLE_EVENTS
FLOWER_FORMAT_TASK
FLOWER_NATURAL_TIME
FLOWER_TASKS_COLUMNS
FLOWER_AUTH_PROVIDER
FLOWER_INSPECT

许可证

Flower根据BSD 3条款许可证获得许可。查看许可文件 在顶级分发目录中获取完整的许可证文本。

获取帮助

请转到irc.freenode.net上的芹菜irc频道或 open an issue

贡献

如果您想贡献,只需分叉the repository,提交 更改,运行测试(tox)并发送拉取请求。 一定要加入CONTRIBUTORS

如果您有兴趣维护项目,请联系。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java在Hibernate中从两个具有不同功能的表(postgreSQL)映射一个实体   java jfreechart需要自定义Y轴,以便打印   Java:从外部获取类。罐子   java如何获取Appium服务器日志   具有完全相同内容的java重写函数会导致错误   java消息的类路径是什么。属性(如果在依赖项jar中)   循环/相等的java问题==   java如何使用ionic cordova angularjs将所选图像发送到spring controller以保存到服务器?   库中的java语言环境数据   java从JSON webservice检索安卓中的字节[]   调试如何从Java中的类调试方法?   java将日期字符串切割成变量   无法使用java附加到文件?