The task was failing for 2 reasons:
1. It was selecting ALL results, flattening them into a list and only
then truncating to 100. The table has 46 million rows. Fix this by
truncating in the database before flattening to a list.
2. The sql query was very expensive, this is because it was filtering
by *time*, but sorting on *time_complete* (the default ordering)
Currently the first time you run the server you need to manually
syncdb, create superuser and collect assets. Do this automatically
on container launch
This caused inaccurate timings and some duplicate jobs running. There
should only ever be a single beat service, whereas we were using a dev
feature to run a beat service on all 16 workers
django-compressor 1.4 does not support well Django 1.8,
and the `manage.py compress` was failing with
`ImportError: cannot import name template_source_loaders`
We cannot go above 1.5, as starting with 1.6, the unit test
`test_query` in `test_urlprefix.URLPrefixTestCase` fails with
'''
UncompressableFileError: '/test/static/bootstrap/css/bootstrap.css'
isn't accessible via COMPRESS_URL ('/static/') and can't be compressed
'''
alert.update_alert_plugins() is executed when the module is loaded.
During tests the module is loaded before the test database is created
causing problems. I've changed it to the intented affect of refreshing
on View initialisation
Main changes are to migrations. I started them again from scratch and
then renamed check to status_check (as check is now reserved by django).
The plugins also needed updating to be django 1.7 compatible. (they have
to defined their own migrations if they depend on an app with migrations
now)
We decided to start versioning at 0.6 to match the django version.
There isn't much reason for this beyond that the next 2 changes will
be django upgrades which will bump the version to 0.7 and 0.8
Add libffi-dev and libssl-dev to provision packages in order to overcome
version incompatibilities preventing 'vagrant up' from completing successfully
- Split out requirements in two files
(testing and main)
- Add Bash script running test with coverage
- Add .coveragerc configuration file,
including Django coverage plugin
- Add post-build to Travis script running CodeCov
- Add tox file for linting of:
- bash config files
- flake8
- Mute all flake8 violations currently not passing
- Install and run tox as part of Travis build
(inside one run because build matrix is hard)