Skip to content

Commit

Permalink
Add --acme_timout option to sewer-cli (komuw#188)
Browse files Browse the repository at this point in the history
Co-authored-by: @menduo
  • Loading branch information
mmaney authored Jun 28, 2020
1 parent 4c3cd1f commit 56d73a3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ usage: sewer [-h] [--version] [--account_key ACCOUNT_KEY]
[--bundle_name BUNDLE_NAME] [--endpoint {production,staging}]
[--email EMAIL] --action {run,renew} [--out_dir OUT_DIR]
[--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
[--acme_timeout #seconds]

Sewer is a Let's Encrypt(ACME) client.
Expand Down Expand Up @@ -247,6 +248,9 @@ optional arguments:
--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}
The log level to output log messages at. eg:
--loglevel DEBUG
--acme_timeout SECONDS
The maximum time the client will wait for a network call
(HTTPS request to ACME server) to complete. Default is 7
```
The certificate, certificate key and account key will be saved in the directory
Expand Down
8 changes: 8 additions & 0 deletions sewer/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,13 @@ def main():
help="The log level to output log messages at. \
eg: --loglevel DEBUG",
)
parser.add_argument(
"--acme_timeout",
type=int,
required=False,
default=7,
help="The maximum time the client will wait for a network call (HTTPS request to ACME server) to complete. Default is 7",
)

args = parser.parse_args()

Expand Down Expand Up @@ -337,6 +344,7 @@ def main():
certificate_key=certificate_key,
ACME_DIRECTORY_URL=ACME_DIRECTORY_URL,
LOG_LEVEL=loglevel,
ACME_REQUEST_TIMEOUT=args.acme_timeout,
)
certificate_key = client.certificate_key
account_key = client.account_key
Expand Down

0 comments on commit 56d73a3

Please sign in to comment.