简体   繁体   English

Django Cookiecutter升级最佳实践

[英]Django Cookiecutter upgrade best practice

I built an application using cookiecutter-django by @pydanny back in May, docker-compose was used for both dev and production environments and it's running very well, 我在5月份使用@pydanny使用cookiecutter-django构建了一个应用程序,docker-compose用于开发和生产环境,它运行得很好,

Now I have a requirement for asynchronous tasks and I want to use Celery, I did not choose celery when using the cookiecutter tool way back at the beginning, 现在我需要异步任务,我想使用Celery,我在开始使用cookiecutter工具的时候没有选择芹菜,

What's the best way to integrate celery into my project ? 将芹菜融入我的项目的最佳方法是什么? Also noting that I will probably take this opportunity to upgrade docker-compose from version 2 to 3, bring mailgun, Django etc. to the latest versions 还注意到我可能会借此机会将docker-compose从版本2升级到3,将mailgun,Django等带到最新版本

Is it too messy to integrate to a live project ? 集成到实时项目是否太麻烦了? Should I just create a new project using the cookiecutter tool ? 我应该使用cookiecutter工具创建一个新项目吗? Not too sure how to approach this so any help would be greatly appreciated, 不太确定如何处理这个,所以任何帮助将不胜感激,

Thanks 谢谢

I solved this by creating a new project from scratch using cookiecutter-django, this time including celery, flower etc. for async tasks. 我通过使用cookiecutter-django从头开始创建一个新项目来解决这个问题,这次包括芹菜,花等等异步任务。 I then migrated my code to the new project. 然后我将我的代码迁移到新项目。 It didn't take too long, you just need to be careful when migrating that you don't miss anything. 它不需要太长时间,你只需要在迁移时要小心,不要错过任何东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM