Skip to content

Conversation

julie-sullivan
Copy link
Collaborator

This feature retries a query on timeout. After a wait period, retries N times.

  • Already merged this change into CellBase 4.x, published in GeL's PyPi
  • Not backwards compatible with Python 2.7. At all.
  • I updated the version to be v5.0.0
  • Didn't test the actual timeout and retry, not sure how to do that. For the 4.x version, GeL tested for me as they were experiencing a lot of CellBase timeouts.
  • Default URL doesn't exist anymore (see below)
  • Tests fail (see below)

@julie-sullivan
Copy link
Collaborator Author

This URL doesn't exist anymore.

## These are the RESTful configurations parameters
rest:
  hosts:
  - "bioinfodev.hpc.cam.ac.uk/cellbase-5.0.0"
  timeout: 2000

@julie-sullivan
Copy link
Collaborator Author

These tests fail without my change:

======================================================================
FAIL: test_get_clinical (tests.test_cbrestclients.GenomicRegionTest)
Checks retrieval of clinical data
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/julie/git/cellbase/cellbase-client/src/main/python/tests/test_cbrestclients.py", line 146, in test_get_clinical
    assert len(res[0]['result']) == 469
AssertionError

======================================================================
FAIL: test_get_substitution_scores (tests.test_cbrestclients.ProteinClientTest)
Checks retrieval of protein substitution scores
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/julie/git/cellbase/cellbase-client/src/main/python/tests/test_cbrestclients.py", line 76, in test_get_substitution_scores
    assert len(res[0]['result']) == 1
AssertionError

----------------------------------------------------------------------
Ran 41 tests in 194.136s

@julie-sullivan julie-sullivan changed the title Add query retry to Pycellbase Add query retry to PyCellBase v5 Jul 6, 2021
@imedina imedina added this to the v5.0.0 milestone Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants