celery

EasyTest-接口自动化测试平台部署上线问题记录

无人久伴 提交于 2021-01-03 15:44:41
平台url: http://easytest.xyz   花巨资搞了个阿里云服务器,哈哈,有想体验指导的大佬私聊我~~~ 部署环境   云服务器:Ubuntu Server 16.04.1 LTS 64位   python 主要包版本: python 3.5.2 Django 2.0.3 BeautifulReport 0.0.9 celery 3.1.25 celery-with-redis 3.0 colorlog 4.0.2 crypto 1.4.1 ddt 1.2.1 django-celery 3.2.2 django-redis 4.0.0 gevent 1.4.0 greenlet 0.4.15 gunicorn 19.9.0 ipython 7.5.0 matplotlib 3.0.0 Pillow 6.0.0 pip 19.1.1 pycrypto 2.6.1 PyMySQL 0.9.3 qrcode 6.1 redis 2.10.6 requests 2.22.0 问题 1.为什么使用python3.5?   ubuntu使用python3.6在安装uwsgi的时候,老是报错,然后还么有找到原因... 2.定时任务运行报错:   1>.TypeError: can only concatenate tuple (not "NoneType") to tuple;

摸鱼 | 有内鬼,停止交易 ( 推荐两个 Github 项目)

安稳与你 提交于 2021-01-03 08:47:53
这个周末没有学习,连摸鱼都争分夺秒。 光光加班就夺走了我周末一天半的时间,感谢领导至少让我在家睡觉而不是在公司通宵。 感恩。 技术文这周写了一些,今天不聊技术,分享两个 Github 项目。 有内鬼,停止交易 一个生成诺基亚的信息截图,可以玩一玩,蛮有意思的。 https://github.com/dcalsky/zzkia 代码可以使用 Docker 直接部署,作者连 Dockerfile 与 docker-compose 配置文件都一并上传了,可以说很贴心。 可以先看看咸鱼生成的样例: 大家可以自己部署一个也可以使用作者搭建好的案例。 https://zzkia.noddl.me:8020/ 这个网站访问较卡,动手能力强的朋友可以参考咸鱼之前写过的 docker 教程自己搭建。 http://mp.weixin.qq.com/mp/homepage?__biz=MzIwNDI1NjUxMg==&hid=3&sn=fd02a149bab8c72908341b6523af7c42&scene=126&sessionid=1571571392&subscene=0&clicktime=1571571396#wechat_redirect flask-restful-example https://github.com/qzq1111/flask-restful-example

Running celery as daemon does not create PID file

为君一笑 提交于 2020-12-30 05:53:26
问题 I have been scratching my brains on this one since past few days, I have seen other issues on stackoverflow (as it is a duplicate question) and I have tried everything to make this work, the workers are running fine but the celery is not starting up as a process. I run the command: sudo service celeryd start and I get: celery init v10.1. Using config script: /etc/default/celeryd celery multi v3.1.23 (Cipater) > Starting nodes... > worker1@ip-172-31-21-215: OK I run: sudo service celeryd

Running celery as daemon does not create PID file

那年仲夏 提交于 2020-12-30 05:53:21
问题 I have been scratching my brains on this one since past few days, I have seen other issues on stackoverflow (as it is a duplicate question) and I have tried everything to make this work, the workers are running fine but the celery is not starting up as a process. I run the command: sudo service celeryd start and I get: celery init v10.1. Using config script: /etc/default/celeryd celery multi v3.1.23 (Cipater) > Starting nodes... > worker1@ip-172-31-21-215: OK I run: sudo service celeryd

Running celery as daemon does not create PID file

一笑奈何 提交于 2020-12-30 05:53:13
问题 I have been scratching my brains on this one since past few days, I have seen other issues on stackoverflow (as it is a duplicate question) and I have tried everything to make this work, the workers are running fine but the celery is not starting up as a process. I run the command: sudo service celeryd start and I get: celery init v10.1. Using config script: /etc/default/celeryd celery multi v3.1.23 (Cipater) > Starting nodes... > worker1@ip-172-31-21-215: OK I run: sudo service celeryd

How to programmatically tell Celery to send all log messages to stdout or stderr?

主宰稳场 提交于 2020-12-30 05:46:06
问题 How does one turn on celery logging programmatically? From the terminal, this works fine: celery worker -l DEBUG When I call get_task_logger(__name__).debug('hello') , I can see the message come up in the terminal. (stdout and stderr are being displayed) I can even import logging and call logger.info('hi') and see that too. (both work) However, while developing a task, I prefer to use a test module and call the task function directly rather than firing up a whole worker. But I can't see the

Prioritizing queues among multiple queues in celery?

别来无恙 提交于 2020-12-29 10:00:10
问题 We are using celery for our asynchronous background tasks and we have 2 queues for different priority tasks. We have 2 cluster of nodes serving them separately. Things are working well as expected. Question: We get mostly low priority tasks. For optimized resource utilization, I am wondering is there a way to configure workers(listening to high priority queue) to listen to both queues. But take jobs from the higher priority queue as long as some job is there? and fallback to low priority

Celery Task with countdown

被刻印的时光 ゝ 提交于 2020-12-29 09:51:43
问题 I am using Celery 2.5.1 and I am trying to use countdown to run the task after 20 seconds, but it gets executed immediately. I am using it as: DemoTask.apply_async(countdown = 20) Am I missing something here? 回答1: The problem is likely not being in the right timezone. By setting countdown=20 you might be telling Celery to execute the task 20 seconds after 3 hours ago. I suggest using the pytz library to tell Celery to start the task at the right time: from datetime import datetime, timedelta

Celery Task with countdown

∥☆過路亽.° 提交于 2020-12-29 09:51:10
问题 I am using Celery 2.5.1 and I am trying to use countdown to run the task after 20 seconds, but it gets executed immediately. I am using it as: DemoTask.apply_async(countdown = 20) Am I missing something here? 回答1: The problem is likely not being in the right timezone. By setting countdown=20 you might be telling Celery to execute the task 20 seconds after 3 hours ago. I suggest using the pytz library to tell Celery to start the task at the right time: from datetime import datetime, timedelta

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

最后都变了- 提交于 2020-12-27 08:12:35
问题 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