Skip to content

Commit

Permalink
Mark caom2repo POSTs as idempotent (#149)
Browse files Browse the repository at this point in the history
* Mark POSTs in caom2repo as idempotent so that the requests can be automatically re-retried on certain failures
  • Loading branch information
andamian authored Aug 28, 2021
1 parent 7cb1c6a commit 2b0cc70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion caom2repo/caom2repo/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ def __init__(self, subject, logLevel=logging.INFO,
self.agent = agent

self._repo_client = net.BaseWsClient(resource_id, subject,
agent, retry=True, host=self.host)
agent, retry=True, host=self.host,
idempotent_posts=True)
try:
self._repo_client.caps.get_access_url(
CURRENT_CAOM2REPO_OBS_CAPABILITY_ID)
Expand Down
4 changes: 2 additions & 2 deletions caom2repo/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ license = AGPLv3
url = http://www.cadc-ccda.hia-iha.nrc-cnrc.gc.ca/caom2
edit_on_github = False
github_project = opencadc/caom2tools
install_requires = cadcutils>=1.1.30 caom2>=2.4
install_requires = cadcutils>=1.2.3 caom2>=2.4
# version should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386)
version = 1.5.1
version = 1.5.2



Expand Down

0 comments on commit 2b0cc70

Please sign in to comment.