- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我已经在本地服务器上检查了我的代码,我确信我的代码一切正常。所以服务器配置似乎有问题。我有一个 linux 服务器(Ubuntu 16.04)并安装了 nginx、redis ……我还为 celery 和 celerybeat 创建了配置文件,如下所示:
我检查了它们的状态,它们都在运行,但是当我检查 beat.log 时,它什么也没做,只显示“正在启动...”
celery 文件:
# Names of nodes to start
CELERYD_NODES="worker"
# Absolute or relative path to the 'celery' command:
CELERY_BIN="/home/amirali/AwesomeApp/awesome_env/bin/celery"
# App instance to use
CELERY_APP="AwesomeApp"
# Where to chdir at start. Where your manage.py is...
CELERYD_CHDIR="/home/amirali/AwesomeApp"
# Extra command-line arguments to the worker
CELERYD_OPTS="--time-limit=300 -Ofair --concurrency=8"
# Set logging level to DEBUG
CELERYD_LOG_LEVEL="INFO"
# %n will be replaced with the first part of the nodename.
CELERYD_LOG_FILE="/var/log/celery/%n%I.log"
CELERYD_PID_FILE="/var/run/celery/%n.pid"
# Workers should run as an unprivileged user.
# You need to create this user manually (or you can choose
# a user/group combination that already exists (e.g., nobody).
CELERYD_USER="celery"
CELERYD_GROUP="celery"
# If enabled pid and log directories will be created if missing,
# and owned by the userid/group configured.
CELERY_CREATE_DIRS=1
celerybeat 文件:
File: /etc/default/celerybeat
CELERYBEAT_LOG_LEVEL="info"
# Absolute or relative path to the 'celery' command:
CELERY_BIN="/home/amirali/AwesomeApp/awesome_env/bin/celery"
CELERYBEAT_USER="celery"
CELERYBEAT_GROUP="celery"
# App instance to use
# comment out this line if you don't use an app
CELERY_APP="AwesomeApp"
# or fully qualified:
#CELERY_APP="proj.tasks:app"
# Where to chdir at start.
CELERYBEAT_CHDIR="/home/amirali/AwesomeApp"
# Extra arguments to celerybeat
CELERYBEAT_OPTS="--schedule=/var/run/celery/celerybeat-schedule"
export DJANGO_SETTINGS_MODULE="AwesomeApp.settings"
最佳答案
当我们不得不执行 celery 周期性任务时,结果 celery-beat
没有正常工作,它只是在某个时刻停止了启动任务。
经过一些测试,我们决定不再浪费时间在它上面,而是依赖 linux crontab
实用程序
关于django - Celery 和 Celerybeat 正在运行,但不运行任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54462403/
我尝试了我能找到的一切,包括: 计算器 How to dynamically add / remove periodic tasks to Celery (celerybeat) Can celery
我想使用django-celery的管理界面为celery创建一个定期任务。我设置了一个任务,当手动或通过脚本调用时,该任务运行得很好。它只是无法通过 celerybeat 工作。根据调试日志,任务在
当我通过 manage.py celerybeat 启动 celerybeat 时,我看到了这个: [2011-07-12 13:37:46,892: WARNING/MainProcess] __
我刚开始使用 celery ,尝试运行一个周期性任务。 已配置 *rabbitmq** 添加了 celeryconfig.py。 并在tasks.py中加入如下代码: from celery.deco
我有 celery 任务: @app.task(ignore_result=True) def update_task(): .... 我在设置中将此任务添加到 celerybeat: CEL
我有一个包含多个 celerybeat 任务的 Django 项目,当我有多个带有单独队列的 celerybeat 任务时,我遇到了一个问题,所以我是否有可能一次运行所有这些任务,运行的最佳实践是什么
我无法通过 celerybeat 计划将参数传递给我的函数。搜索后,看起来我应该能够使用 args 命令传递它们,但我收到了如下错误。谁能指出我正确的方向? CELERYBEAT_SCHEDULE =
我正在使用 Bottle 构建一些项目,我需要它定期运行某些预定的操作。 我决定使用 rabbitmq + celery,因为这似乎是以编程方式管理计划工作的最强大和最完整的解决方案。 我安装了 ra
我有一个任务calculate_common_locations,它通过CELERYBEAT_SCHEDULE 运行一次。该任务只是调用数据库中的一个函数: @app.task def calcula
我正在使用 celery 构建应用程序,最近我们需要按计划运行某些任务。 我认为 celerybeat 非常适合这个,但我有几个问题: 是否可以运行多个 celerybeat 实例,这样任务就不会重复
我们正在使用 django-celery==3.1.10 celery==3.1.20 python 2.7.13 我们编写了一个 CustomDataBaseScheduler 来调度任务,它可以完
您如何诊断为什么 manage.py celerybeat 不执行任何任务? 我正在通过 supervisord 使用以下命令运行 celerybeat: /usr/local/myapp/src/m
我发现 celerybeat 在其调度中使用 UTC 时间(并以英国时间输出日志?!)即使我相信我的 django settings.py 中有所需的设置: TIME_ZONE = 'UTC' USE
我有一个使用 celeryd 和 celerybeat 的 django 应用程序。两者都设置为作为守护程序运行。 celerybeat 任务不会被执行,因为 celerybeat 没有正确启动。根据
我正在寻找推荐的解决方案来解决 celerybeat 成为 celery/rabbitmq 部署的单点故障的问题。到目前为止,通过搜索网络,我没有找到任何有意义的东西。 就我而言,定时调度程序每天启动
我正在用 python 编写基于 celerybeat-mongo 的 celerybeat 自定义调度程序类与 mongodb 一起工作的项目。 实际上,我正在尝试使用 couchbase 而不是
我有一个任务,我使用 celerybeat 每分钟执行一次。它工作正常。但有时,任务的运行时间比一分钟多几秒钟,因为任务的两个实例都在运行。这会导致一些竞争条件把事情搞砸。 我可以(而且可能应该)修复
我有以下设置: celery-with-redis - 3.0 - active celery - 3.0.12 - active django-celer
成熟到什么程度 Chronos ?它是像 celery-beat 这样的调度程序的可行替代方案吗? 现在我们的调度实现了一个周期性的“心跳”任务,它检查“未完成”的事件并在它们过期时触发它们。我们正在
celeryd不需要pidfile,但celerybeat好像。有什么办法可以禁用它吗?我正在使用 Upstart 来管理进程,因此使用 pidfile 是多余的。 最佳答案 以下似乎对一些人有用,所
我是一名优秀的程序员,十分优秀!