migrate from BROKER_URL to CELERY_BROKER_URL

This commit is contained in:
j 2019-07-16 20:58:10 +01:00
commit 2c41b17bc4
5 changed files with 21 additions and 14 deletions

View file

@ -261,6 +261,17 @@ if __name__ == "__main__":
run('./pandora/manage.py', 'createcachetable')
if old <= 6108:
run('./bin/pip', 'install', '-r', 'requirements.txt')
if old <= 6160:
run('./bin/pip', 'install', '-r', 'requirements.txt')
with open('pandora/local_settings.py', 'r') as f:
local_settings = f.read()
if 'BROKER_URL' in local_settings and 'CELERY_BROKER_URL' not in local_settings:
local_settings = [
'CELERY_' + l if l.startswith('BROKER_URL') else l
for l in local_settings.split('\n')
]
with open('pandora/local_settings.py', 'w') as f:
f.write('\n'.join(local_settings))
else:
if len(sys.argv) == 1:
branch = get_branch()