From ff051849d2c239b741966ec0a3460f989acb133d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Furma=C5=84ski?= Date: Fri, 5 Feb 2016 14:47:46 +0100 Subject: [PATCH] Setup all cassandra connections at startup + remove Django 1.5 from tests --- .travis.yml | 1 - django_cassandra_engine/models.py | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8f0a8e4..6eab6ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ sudo: false services: cassandra env: - - DJANGO_VERSION=1.5 CASS_DRIVER_NO_CYTHON=1 - DJANGO_VERSION=1.6 CASS_DRIVER_NO_CYTHON=1 - DJANGO_VERSION=1.7 CASS_DRIVER_NO_CYTHON=1 - DJANGO_VERSION=1.8 CASS_DRIVER_NO_CYTHON=1 diff --git a/django_cassandra_engine/models.py b/django_cassandra_engine/models.py index 9772097..f5b4453 100644 --- a/django_cassandra_engine/models.py +++ b/django_cassandra_engine/models.py @@ -1,6 +1,5 @@ -from django_cassandra_engine.utils import get_cassandra_connection +from django_cassandra_engine.utils import get_cassandra_connections -cassandra_connection = get_cassandra_connection() -if cassandra_connection is not None: - cassandra_connection.connect() +for _, conn in get_cassandra_connections(): + conn.connect()