Closed MaxiGott closed 1 year ago
Hi MaxiGott,
I'm happy to approve this, just wondering what the use case is for this change?
-Jesper
Hi Jesper, I would like to inject a retry strategy to to the zeep client. This can be done by a request session object like this:
import requests
from polarion import polarion
from requests.adapters import HTTPAdapter, Retry
# example of a retry strategy
my_sess = requests.Session()
retries = Retry(total=5,
backoff_factor=0.1,
status_forcelist=[ 500, 502, 503, 504 ]) # only retry those status codes
my_sess.mount('http://', HTTPAdapter(max_retries=retries)) # for all http connections
pol = polarion.Polarion(
server = "<SOME_URL>",
user="<USER>"
password="<PW>"
request_session=s)
Thanks in advance! MaxiGott
Cool, I learned something new. Thanks!
Thanks, and keep up your great work ! :)
:sparkles: feat(Polarion Session object): reuse request session object for soap interface
Added possibility to add a request session to the Polarion class arguments.