diff --git a/.travis.yml b/.travis.yml index 9f807e2fe..65d0d7086 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ install: 'pandas>=0.18' 'matplotlib>=1.1.0' 'scipy>0.13.0' 'numpy>=1.7' 'h5py>=2.3.1' - source activate qiita - pip install -U pip - - pip install sphinx sphinx-bootstrap-theme coveralls 'ipython[all]==2.4.1' + - pip install sphinx sphinx-bootstrap-theme coveralls 'ipython[all]==2.4.1' nose-timer - travis_retry pip install . --process-dependency-links - 'echo "backend: Agg" > matplotlibrc' # Install the biom plugin so we can run the analysis tests @@ -56,7 +56,7 @@ script: - if [ ${TEST_ADD_STUDIES} == "True" ]; then test_data_studies/commands.sh ; fi - if [ ${TEST_ADD_STUDIES} == "True" ]; then qiita-cron-job ; fi - if [ ${TEST_ADD_STUDIES} == "False" ]; then qiita-test-install ; fi - - if [ ${TEST_ADD_STUDIES} == "False" ]; then nosetests --with-doctest --with-coverage -v --cover-package=qiita_db,qiita_pet,qiita_core,qiita_ware; fi + - if [ ${TEST_ADD_STUDIES} == "False" ]; then nosetests --with-doctest --with-coverage --with-timer -v --cover-package=qiita_db,qiita_pet,qiita_core,qiita_ware; fi - flake8 qiita_* setup.py scripts/* - ls -R /home/travis/miniconda3/envs/qiita/lib/python2.7/site-packages/qiita_pet/support_files/doc/ - qiita pet webserver diff --git a/qiita_db/analysis.py b/qiita_db/analysis.py index 048d1f5ce..2421322c4 100644 --- a/qiita_db/analysis.py +++ b/qiita_db/analysis.py @@ -183,8 +183,10 @@ def create(cls, owner, name, description, from_default=False, VALUES (%s, %s)""" qdb.sql_connection.TRN.add(sql, [a_id, job.id]) qdb.sql_connection.TRN.execute() - job.submit() - return instance + + # Doing the submission outside of the transaction + job.submit() + return instance @classmethod def delete(cls, _id): diff --git a/scripts/qiita b/scripts/qiita index ac0053413..65153b0ba 100755 --- a/scripts/qiita +++ b/scripts/qiita @@ -464,7 +464,8 @@ def start(port, master): # Set a PeriodicCallback for cleaning up the threads every 10 seconds # To understand why this is working as expected, check the multiprocessing # documentation https://docs.python.org/2/library/multiprocessing.html - PeriodicCallback(lambda: active_children(), 10000).start() + # 600000 == 10 min + PeriodicCallback(lambda: active_children(), 600000).start() ioloop.start()