You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can result in a 10x speedup when querying an HTTPS Jenkins server for large numbers of job statuses, by reusing the existing SSL session to avoid renegotiating the key for each request. The code is simple:
class Jenkins(object):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.session = requests.Session()
def _http_get(self, url, **kwargs):
''' Perform an HTTP GET request.
This will add required authentication and SSL verification arguments.
'''
response = self.session.get(url, auth=self.auth, verify=self.verify_ssl_cert, proxies=self.proxies, **kwargs)
return _validate(response)
def _http_post(self, url, **kwargs):
''' Perform an HTTP POST request.
This will add required authentication and SSL verification arguments.
'''
response = self.session.post(url, auth=self.auth, verify=self.verify_ssl_cert, proxies=self.proxies, **kwargs)
return _validate(response)
The text was updated successfully, but these errors were encountered:
firehooper
added a commit
to firehooper/autojenkins
that referenced
this issue
Mar 10, 2022
This can result in a 10x speedup when querying an HTTPS Jenkins server for large numbers of job statuses, by reusing the existing SSL session to avoid renegotiating the key for each request. The code is simple:
The text was updated successfully, but these errors were encountered: