#238 Retry pulp communication on failure
Merged 5 years ago by jkaluza. Opened 5 years ago by lucarval.
lucarval/odcs pulp-retry  into  master

@@ -27,6 +27,7 @@ 

  import requests

  

  from odcs.server.mergerepo import MergeRepo

+ from odcs.server.utils import retry

  

  

  class Pulp(object):
@@ -39,6 +40,7 @@ 

          self.compose = compose

          self.rest_api_root = '{0}/pulp/api/v2/'.format(self.server_url.rstrip('/'))

  

+     @retry(wait_on=requests.exceptions.RequestException)

      def _rest_post(self, endpoint, post_data):

          query_data = json.dumps(post_data)

          r = requests.post(

There may be hiccups when communicating with Pulp instance. Retry request before giving up which would cause a compose failure.

Pull-Request has been merged by jkaluza

5 years ago