Skip to content

Instantly share code, notes, and snippets.

View jerith's full-sized avatar

Jeremy Thurgood jerith

  • Cape Town, South Africa
View GitHub Profile
diff --git a/.travis.yml b/.travis.yml
index b694f23..fd8afd3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -11,6 +11,10 @@ matrix:
# Test against the Travis-provided version of Riak (currently 2.0.x).
# This is a separate matrix inclusion to avoid spawning unnecessary builds.
- python: "2.7"
+ ## Riak 2.0 sometimes doesn't have enough file descriptors:
+ ## https://github.com/travis-ci/travis-ci/issues/3328
diff --git a/.travis.yml b/.travis.yml
index 3e1b683..1ab57c3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,7 +16,11 @@ matrix:
# are orthogonal and any failures should be easily attributable to either
# Twisted version or Riak version without adding an additional build job.
- python: "2.7"
- env: TWISTED_VERSION="Twisted==13.1.0" RIAK_VERSION="current"
+ ## Riak 2.0 sometimes doesn't have enough file descriptors:
diff --git a/utils/setup_travis_riak.sh b/utils/setup_travis_riak.sh
index 3493668..cd111f6 100755
--- a/utils/setup_travis_riak.sh
+++ b/utils/setup_travis_riak.sh
@@ -40,6 +40,17 @@ case "${RIAK_VERSION}" in
esac
+# Set the default ulimit if it isn't already set.
+if [ -e /etc/default/riak ]; then
diff --git a/.travis.yml b/.travis.yml
index a80102f..3e1b683 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -38,3 +38,6 @@ script:
- VUMITEST_REDIS_DB=1 VUMI_TEST_NODE_PATH="$(which node)" coverage run --source=vumi `which trial` vumi
after_success:
- coveralls
+# To figure out why Riak 2.0 sometimes breaks.
+after_failure:
diff --git a/.travis.yml b/.travis.yml
index fe7f174..b694f23 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -5,13 +5,13 @@ python:
node_js:
- "0.10"
env:
- - VUMITEST_REDIS_DB=1 VUMIGO_TEST_DB=postgres VUMI_TEST_TIMEOUT=10 RIAK_VERSION=current
+ - RIAK_VERSION="1.4.12-1" VUMITEST_REDIS_DB=1 VUMIGO_TEST_DB=postgres VUMI_TEST_TIMEOUT=10
diff --git a/vumi/components/message_store.py b/vumi/components/message_store.py
index 1487ca8..acdcf10 100644
--- a/vumi/components/message_store.py
+++ b/vumi/components/message_store.py
@@ -9,7 +9,7 @@ from uuid import uuid4
import itertools
import warnings
-from twisted.internet.defer import returnValue, inlineCallbacks
+from twisted.internet.defer import returnValue
diff --git a/setup.py b/setup.py
index b953ae0..8b287f1 100644
--- a/setup.py
+++ b/setup.py
@@ -35,7 +35,7 @@ setup(
'wokkel',
'redis>=2.7.1',
'txredis',
- 'python-smpp>=0.1.2',
+ 'python-smpp>=0.1.5',
#!/bin/bash -e -x
RELEASE_VER="${1?Release version number must be provided.}"
POST_RELEASE_VER="${2?Post-release version number must be provided.}"
# Make sure all our branches are up to date.
git checkout develop > /dev/null
git pull
git checkout master > /dev/null
git merge origin/master
diff --git a/vumi/application/sandbox.py b/vumi/application/sandbox.py
index c5a994a..abdef61 100644
--- a/vumi/application/sandbox.py
+++ b/vumi/application/sandbox.py
@@ -344,8 +344,8 @@ class RedisResource(SandboxResource):
else:
api.log('Redis hard limit of %s keys reached for sandbox %s. '
'No more keys can be written.' % (
- api.sandbox_id,
- self.keys_per_user_hard),
diff --git a/go/base/management/commands/go_account_stats.py b/go/base/management/commands/go_account_stats.py
index 29bc13d..92259fa 100644
--- a/go/base/management/commands/go_account_stats.py
+++ b/go/base/management/commands/go_account_stats.py
@@ -120,7 +120,7 @@ class Command(BaseCommand):
def do_batch_key_breakdown(self, msg_store, batch_key):
inbound = msg_store.batch_inbound_keys_with_addresses(batch_key)
inbound_per_date, inbound_uniques = self.collect_stats(inbound)
- outbound = msg_store.batch_inbound_keys_with_addresses(batch_key)
+ outbound = msg_store.batch_outbound_keys_with_addresses(batch_key)