search

Home  >  Q&A  >  body text

python - celery 如何解决worker和client代码同步问题

我的celery worker在A机器, client在B机器, 这样每次代码更新我都必须同时更新A和B,并且依次停掉client, celery worker, 再依次开启celery worker和client, 这样不就非常麻烦吗? 有什么好的解决方案?

PHP中文网PHP中文网2875 days ago714

reply all(1)I'll reply

  • 迷茫

    迷茫2017-04-18 10:27:32

    First, celery must be restarted after updating the code, because the scripts have been loaded into the memory, and you can only restart if you want to update.

    Second, there are many ways to synchronize codes, such as: rsync或者其它的部署系统fabricAnsible etc. can meet your requirements.

    The processing logic is the same as yours, but it can be automated.

    reply
    0
  • Cancelreply