---
defaults: &defaults
  buildpack: python_buildpack
  instances: 1
  memory: 512M
  no-route: true
  health-check-type: none

applications:
  - name: performance-platform-backdrop-read
    <<: *defaults
    command: python start.py read 8080
    services:
      - redis
      - backdrop-db

  - name: performance-platform-backdrop-write
    <<: *defaults
    command: python start.py write 8080
    services:
      - redis
      - backdrop-db

  - name: performance-platform-backdrop-celery-worker
    <<: *defaults
    command: celery -A backdrop.transformers.worker worker --loglevel=info
    memory: 1G
    services:
      - redis
    env:
      BACKDROP_BROKER_SSL_CERT_REQS: CERT_NONE
      CELERY_CONFIG_MODULE: backdrop.celeryconfig

  - name: performance-platform-backdrop-flower
    <<: *defaults
    command: etc/run_flower.sh
    memory: 1G
    services:
      - redis
    env:
      DISABLE_COLLECTSTATIC: 1
      BACKDROP_BROKER_SSL_CERT_REQS: CERT_NONE
      CELERY_CONFIG_MODULE: backdrop.celeryconfig

---
defaults: &defaults
  buildpack: python_buildpack
  instances: 1
  memory: 512M
  no-route: true
  health-check-type: none

applications:
  - name: performance-platform-backdrop-read
    <<: *defaults
    command: python start.py read 8080
    services:
      - redis
      - backdrop-db

  - name: performance-platform-backdrop-write
    <<: *defaults
    command: python start.py write 8080
    services:
      - redis
      - backdrop-db
    env:
      BACKDROP_BROKER_SSL_CERT_REQS: CERT_NONE
      CELERY_CONFIG_MODULE: backdrop.celeryconfig

  - name: performance-platform-backdrop-celery-worker
    <<: *defaults
    command: celery -A backdrop.transformers.worker worker --loglevel=info
    memory: 1G
    services:
      - redis
    env:
      BACKDROP_BROKER_SSL_CERT_REQS: CERT_NONE
      CELERY_CONFIG_MODULE: backdrop.celeryconfig

  - name: performance-platform-backdrop-flower
    <<: *defaults
    command: etc/run_flower.sh
    memory: 1G
    services:
      - redis
    env:
      DISABLE_COLLECTSTATIC: 1
      BACKDROP_BROKER_SSL_CERT_REQS: CERT_NONE
      CELERY_CONFIG_MODULE: backdrop.celeryconfig

Fix missing celery config for write api.
Fix missing celery config for write api.

The celery configuration was missing from the write api app and so every
request that triggered a task in celery would hang / timeout / return an
http 502. This restores said config.
