ssl-checker icon indicating copy to clipboard operation
ssl-checker copied to clipboard

Provide support for customizable timeout

Open Zlender opened this issue 2 years ago • 1 comments

This allows for customizable timeout in either command line or library mode.

The issue was first raised in #10 and I think this fixes it.

Zlender avatar Mar 02 '22 16:03 Zlender

Test script I used

from ssl_checker import SSLChecker
SSLChecker = SSLChecker()
args = {
  'timeout' : 2.0,
  'hosts' : [
    'acquiacustomertest.com',
    'ks-1.sandbox.acquia.io',
    'master.e.as5001dualar.ahserversdev.com',
]}
response = SSLChecker.show_result(SSLChecker.get_args(json_args=args))
time python3.9 test.py
python3.9 test.py  0.06s user 0.02s system 3% cpu 2.520 total```

Without the timeout

from ssl_checker import SSLChecker
SSLChecker = SSLChecker()
args = {
  'hosts' : [
    'acquiacustomertest.com',
    'ks-1.sandbox.acquia.io',
    'master.e.as5001dualar.ahserversdev.com',
]}
response = SSLChecker.show_result(SSLChecker.get_args(json_args=args))
time python3.9 test.py
python3.9 test.py  0.06s user 0.04s system 0% cpu 1:15.61 total

Zlender avatar Mar 02 '22 16:03 Zlender