celery

Django Celery - Cannot connect to amqp://guest@127.0.0.8000:5672//

China☆狼群 提交于 2020-12-27 08:09:01
问题 I'm trying to set up Django-Celery. I'm going through the tutorial http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html when I run $ python manage.py celery worker --loglevel=info I get [Tasks] /Users/msmith/Documents/dj/venv/lib/python2.7/site-packages/djcelery/loaders.py:133: UserWarning: Using settings.DEBUG leads to a memory leak, never use this setting in production environments! warnings.warn('Using settings.DEBUG leads to a memory leak, never ' [2013-08-08 11:15

HttpRunnerManager自动化测试安装部署(CentOS)

江枫思渺然 提交于 2020-12-25 18:14:48
HttpRunnerManager V2.0此项目是一个基于HttpRunner的接口自动化测试平台,同时HttpRunner 是一款面向 HTTP(S) 协议的通用测试框架,只需编写维护一份 YAML/JSON 脚本,即可实现自动化测试、性能测试、线上监控、持续集成等多种测试任务。 新版本主要增加了定时任务,异步执行,报告持久化、日志保存以及数据类型支持,QQ群欢迎提问:628448476。 本文将自行进行安装的步骤进行整理发布,这是在网络参考一些大神发布的文章,同时总结了一些新的问题。 一、准备环境和安装包 主要包括:CentOS7.6,HttpRunnerManager V2.0,mysql5.7.26,python3.6.4,Django2.1.2,rabbitmq-server-3.6.8(为了避免兼容问题,强烈建议版本尽可能相同,不同时尽量选更高版本。) CentOS建议不要用6.X,会出现各种难以解决的问题,一些安装包的很难解决依赖包和相应版本问题,建议重新用centos7X版本。 下载可自行百度,个人在此提供以下包下载链接。 CentOS:https://mirrors.edge.kernel.org/centos/7.6.1810/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso(安装教程:https://www.cnblogs

02 用户注册通过发送邮箱激活

筅森魡賤 提交于 2020-12-16 10:57:17
配置静态文件 在项目根目录下创建静态文件static目录,用于放置静态的文件 在settings 文件中定义静态内容 STATIC_URL = ' /static/ ' STATICFILES_DIRS = [ os.path.join(BASE_DIR, ' static ' ), ] 把静态的文件如css,js,image放入static目录中: 把当前关于注册用到的模板放到模板文件中, 在应用users中 views视图定义处理注册的请求函数,返回注册的页面: 类视图: http://python.usyiyi.cn/translate/django_182/topics/class-based-views/intro.html # 导入类视图,主要给urls from django.views.generic import View class RegisterView(View): """注册""" def get(self, request): """对应get请求方式,提供注册页面""" return render(request, "register.html", ) 在根级urls中配置到应用users的跳转路径 import users.urls url(r'^users/', include(users.urls, namespace="users")),

celery worker only imports tasks when not detached

假装没事ソ 提交于 2020-12-12 10:01:37
问题 I'm trying to get my django app to submit tasks to a celery worker and it's succeeding when the worker is run attached. As soon as I add the --detach the tasks are failing to be registered. [2020-10-26 04:09:33,159: ERROR/MainProcess] Received unregistered task of type 'devapp.tasks.create_random_files'. The message has been ignored and discarded. Did you remember to import the module containing this task? Or maybe you're using relative imports? Please see http://docs.celeryq.org/en/latest

celery worker only imports tasks when not detached

亡梦爱人 提交于 2020-12-12 10:00:48
问题 I'm trying to get my django app to submit tasks to a celery worker and it's succeeding when the worker is run attached. As soon as I add the --detach the tasks are failing to be registered. [2020-10-26 04:09:33,159: ERROR/MainProcess] Received unregistered task of type 'devapp.tasks.create_random_files'. The message has been ignored and discarded. Did you remember to import the module containing this task? Or maybe you're using relative imports? Please see http://docs.celeryq.org/en/latest

celery worker only imports tasks when not detached

一曲冷凌霜 提交于 2020-12-12 10:00:34
问题 I'm trying to get my django app to submit tasks to a celery worker and it's succeeding when the worker is run attached. As soon as I add the --detach the tasks are failing to be registered. [2020-10-26 04:09:33,159: ERROR/MainProcess] Received unregistered task of type 'devapp.tasks.create_random_files'. The message has been ignored and discarded. Did you remember to import the module containing this task? Or maybe you're using relative imports? Please see http://docs.celeryq.org/en/latest

How to dynamically add a scheduled task to Celery beat

佐手、 提交于 2020-12-08 06:07:14
问题 Using Celery ver.3.1.23, I am trying to dynamically add a scheduled task to celery beat. I have one celery worker and one celery beat instance running. Triggering a standard celery task y running task.delay() works ok. When I define a scheduled periodic task as a setting in configuration, celery beat runs it. However what I need is to be able to add a task that runs at specified crontab at runtime. After adding a task to persistent scheduler, celery beat doesn't seem to detect the newly added

How do I run celery status/flower without the -A option?

风格不统一 提交于 2020-12-04 16:01:10
问题 Consider this bash session: $ export DJANGO_SETTINGS_MODULE=web.settings $ celery status -b redis://redis.businessoptics.dev:6379/1 -t 10 Error: No nodes replied within time constraint. $ celery status -b redis://redis.businessoptics.dev:6379/1 -t 10 -A scaffold.tasks.celery_app celery@worker.9e2c39a1c42c: OK Why do I need the -A option? As far as I can tell celery should be able to detect the necessary metadata on redis. Similarly if I run celery flower -b <redis url> it shows that it

How do I run celery status/flower without the -A option?

佐手、 提交于 2020-12-04 16:00:31
问题 Consider this bash session: $ export DJANGO_SETTINGS_MODULE=web.settings $ celery status -b redis://redis.businessoptics.dev:6379/1 -t 10 Error: No nodes replied within time constraint. $ celery status -b redis://redis.businessoptics.dev:6379/1 -t 10 -A scaffold.tasks.celery_app celery@worker.9e2c39a1c42c: OK Why do I need the -A option? As far as I can tell celery should be able to detect the necessary metadata on redis. Similarly if I run celery flower -b <redis url> it shows that it

How do I run celery status/flower without the -A option?

限于喜欢 提交于 2020-12-04 16:00:06
问题 Consider this bash session: $ export DJANGO_SETTINGS_MODULE=web.settings $ celery status -b redis://redis.businessoptics.dev:6379/1 -t 10 Error: No nodes replied within time constraint. $ celery status -b redis://redis.businessoptics.dev:6379/1 -t 10 -A scaffold.tasks.celery_app celery@worker.9e2c39a1c42c: OK Why do I need the -A option? As far as I can tell celery should be able to detect the necessary metadata on redis. Similarly if I run celery flower -b <redis url> it shows that it