Merge pull request #2134 from coolo/put_openqa
rabbit-openqa: Catch exceptions as PUT to openqa might result in 404
This commit is contained in:
commit
35dabf52dd
@ -14,7 +14,7 @@ from osclib.conf import Config
|
|||||||
from osclib.stagingapi import StagingAPI
|
from osclib.stagingapi import StagingAPI
|
||||||
from lxml import etree as ET
|
from lxml import etree as ET
|
||||||
from openqa_client.client import OpenQA_Client
|
from openqa_client.client import OpenQA_Client
|
||||||
from openqa_client.exceptions import ConnectionError
|
from openqa_client.exceptions import ConnectionError, RequestError
|
||||||
from urllib.error import HTTPError, URLError
|
from urllib.error import HTTPError, URLError
|
||||||
from urllib.parse import quote_plus
|
from urllib.parse import quote_plus
|
||||||
|
|
||||||
@ -209,7 +209,10 @@ class Listener(PubSubConsumer):
|
|||||||
# notify openQA to sync the projects - the plugin will check itself it
|
# notify openQA to sync the projects - the plugin will check itself it
|
||||||
# the project is to be synced. For now we notify about every 'images' repo
|
# the project is to be synced. For now we notify about every 'images' repo
|
||||||
if payload['repo'] == 'images':
|
if payload['repo'] == 'images':
|
||||||
self.openqa.openqa_request('PUT', 'obs_rsync', str(payload['project']), 'runs')
|
try:
|
||||||
|
self.openqa.openqa_request('PUT', 'obs_rsync/{}/runs'.format(payload['project']), retries=0)
|
||||||
|
except RequestError as e:
|
||||||
|
self.logger.info("Got exception on syncing repository: {}".format(e))
|
||||||
|
|
||||||
def on_openqa_job(self, iso):
|
def on_openqa_job(self, iso):
|
||||||
self.logger.debug('openqa_job_change %s', iso)
|
self.logger.debug('openqa_job_change %s', iso)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user