language: python
python:
  - 3.4
install:
  - pip install -r requirements.txt
script:
  - coverage run --source=sergey,proposal manage.py test
  - python manage.py syncdb --noinput
  - python manage.py migrate --noinput
  - python manage.py review
after_success:
  - coveralls
deploy:
  provider: heroku
  api_key:
    secure: ZD5BgojYQUWqegRjdIDNy/VaWIHJTLSbWiBCqYZxH+ZGJueBUOGdJEYCAGkKxUotBe4XaowX/y7/MROCYMQ0J2vr02T5Gyj9TZKtDfbMZ/0OjB7jHFKn0RC1pej8yt4ruslF1xqL0YwAZhD5DO6QSm5c0L5HK6Is9dlgtIcuM/Y=
  app: pyvideoru
  on:
    repo: coagulant/pyvideo.ru
  run:
    - "python manage.py migrate --noinput"
    - "python manage.py review"
    - "python manage.py embed"
    - "python manage.py update_index"
    - restart

language: python
python:
  - 3.4
install:
  - pip install -r requirements.txt
script:
  - coverage run --source=sergey,proposal manage.py test
  - python manage.py syncdb --noinput
  - python manage.py migrate --noinput
  - python manage.py review
after_success:
  - coveralls
deploy:
  provider: heroku
  api_key:
    secure: ZD5BgojYQUWqegRjdIDNy/VaWIHJTLSbWiBCqYZxH+ZGJueBUOGdJEYCAGkKxUotBe4XaowX/y7/MROCYMQ0J2vr02T5Gyj9TZKtDfbMZ/0OjB7jHFKn0RC1pej8yt4ruslF1xqL0YwAZhD5DO6QSm5c0L5HK6Is9dlgtIcuM/Y=
  app: pyvideoru
  on:
    repo: coagulant/pyvideo.ru
  run:
    - "python manage.py migrate --noinput"
    - "python manage.py review"
    - "python manage.py embed"
    - "python manage.py clear_index --noinput"
    - "python manage.py update_index"
    - restart

Make sure search index is rebuilt completely when deploying
Make sure search index is rebuilt completely when deploying

This is suboptimal, but makes sure we don't have to
check and fix search problems, like
pyelasticsearch.exceptions.ElasticHttpError: (403, 'IndexClosedException[[pyvideo] closed]')
Probably, not a good idea (but should help)
