{"id":18663285,"url":"https://github.com/ronething/celery-notes","last_synced_at":"2026-05-18T06:41:20.353Z","repository":{"id":49705915,"uuid":"200399933","full_name":"ronething/celery-notes","owner":"ronething","description":"🌈 https://github.com/celery/celery","archived":false,"fork":false,"pushed_at":"2021-06-10T18:44:59.000Z","size":65,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-18T04:36:21.791Z","etag":null,"topics":["celery","django","mq","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ronething.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-03T16:56:45.000Z","updated_at":"2023-07-27T17:01:46.000Z","dependencies_parsed_at":"2022-09-19T06:30:19.975Z","dependency_job_id":null,"html_url":"https://github.com/ronething/celery-notes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ronething/celery-notes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronething%2Fcelery-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronething%2Fcelery-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronething%2Fcelery-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronething%2Fcelery-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ronething","download_url":"https://codeload.github.com/ronething/celery-notes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronething%2Fcelery-notes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267141132,"owners_count":24041982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["celery","django","mq","python"],"created_at":"2024-11-07T08:15:55.295Z","updated_at":"2026-05-18T06:41:20.295Z","avatar_url":"https://github.com/ronething.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# celery notes\n\n## 使用场景\n\n- 异步任务：将耗时操作任务提交给 celery 去异步执行，比如发送短信/邮件、消息推送、音视频处理等等\n- 定时任务：类似于 linux crontab，比如每日数据统计\n\n## 开发\n\n- 启动 flower\n\n`python manage.py celery flower`\n\n可以通过 `--basic_auth=username:password` 添加认证\n\n- 启动 worker\n\n`pipenv run python manage.py celery worker -l INFO`\n\n- 启动 beat\n\n`pipenv run python manage.py celery beat -l INFO`\n\n## supervisor\n\n使用 supervisor 进行进程管理\n\n- 默认配置文件导入\n\n```sh\nmkdir conf\necho_supervisord_conf \u003e conf/supervisord.conf\n```\n\n- 取消部分注释\n\n```\n[inet_http_server]         ; inet (TCP) server disabled by default\nport=127.0.0.1:9001        ; ip_address:port specifier, *:port for all iface\n[supervisorctl]\nserverurl=unix:///tmp/supervisor.sock ; use a unix:// URL  for a unix socket\nserverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket\n[include]\nfiles = *.ini\n```\n\n## qa\n\n- `TypeError: can only concatenate list (not \"tuple\") to list`\n\n```\n  File \"/Users/ronething/.local/share/virtualenvs/celeryDEMO-YQTcXGNv/lib/python3.7/site-packages/djcelery/management/commands/celery.py\", line 11, in \u003cmodule\u003e\n    class Command(CeleryCommand):\n  File \"/Users/ronething/.local/share/virtualenvs/celeryDEMO-YQTcXGNv/lib/python3.7/site-packages/djcelery/management/commands/celery.py\", line 23, in Command\n    preload_options)\nTypeError: can only concatenate list (not \"tuple\") to list\n```\n\ndjango-celery 问题\n\n```\nvim /Users/ronething/.local/share/virtualenvs/celeryDEMO-YQTcXGNv/lib/python3.7/site-packages/djcelery/management/commands/celery.py\n```\n\n将一下这几行注释\n\n```\n   21     # options = (cc_options +                                                                                            \n   22     #            base_options +                                                                                          \n   23     #            preload_options) \n```\n\n- `kombu.async.timer`\n\n```\n  File \"/Users/ronething/.local/share/virtualenvs/celeryDEMO-YQTcXGNv/lib/python3.7/site-packages/celery/utils/timer2.py\", line 19\n    from kombu.async.timer import Entry, Timer as Schedule, to_timestamp, logger\n                   ^\nSyntaxError: invalid syntax\n```\n\n解决方法：async 在 python3.7 已经是关键字 降级或者改变量名\n\n- `pipenv.patched.notpip._internal.exceptions.InstallationError` \n\n```\npipenv.patched.notpip._internal.exceptions.InstallationError: Command \"python setup.py egg_info\" failed with error code 1 in /var/folders/xr/8kys7jh56tn91lhc_72nh_wh0000gn/T/tmp1morwpx6build/lazy-object-proxy/\n```\n\n\n解决方法：`export AIRFLOW_GPL_UNIDECODE=yes` 刚好适用我 如果出现其他情况，请另寻解决方案\n\nhttps://github.com/pypa/pipenv/issues/2791#issuecomment-420948394\n\n- tasks 实例化过程\n\nhttps://blog.csdn.net/qq_40394962/article/details/85495285\n\n## 0x0F\n\n- http://www.beixiongxiong.com/course/10103254/2123/\n- https://www.cnblogs.com/cwp-bg/p/10575688.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronething%2Fcelery-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fronething%2Fcelery-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronething%2Fcelery-notes/lists"}