Skip to content

Commit

Permalink
Set default to 60 seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
TheByronHimes committed Sep 6, 2024
1 parent 7991526 commit e8b1bae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The service requires the following configuration parameters:

- **`use_starttls`** *(boolean)*: Boolean flag indicating the use of STARTTLS. Default: `true`.

- **`smtp_timeout`**: The maximum amount of time (in seconds) to wait for a connection to the SMTP server. If set to `None`, the operation will wait indefinitely. Default: `null`.
- **`smtp_timeout`**: The maximum amount of time (in seconds) to wait for a connection to the SMTP server. If set to `None`, the operation will wait indefinitely. Default: `60`.

- **Any of**

Expand Down
2 changes: 1 addition & 1 deletion config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"type": "null"
}
],
"default": null,
"default": 60,
"description": "The maximum amount of time (in seconds) to wait for a connection to the SMTP server. If set to `None`, the operation will wait indefinitely.",
"title": "Smtp Timeout"
},
Expand Down
2 changes: 1 addition & 1 deletion example_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ smtp_auth:
username: [email protected]
smtp_host: 127.0.0.1
smtp_port: 587
smtp_timeout: null
smtp_timeout: 60.0
use_starttls: false
2 changes: 1 addition & 1 deletion src/ns/adapters/outbound/smtp_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class SmtpClientConfig(BaseSettings):
default=True, description="Boolean flag indicating the use of STARTTLS"
)
smtp_timeout: PositiveFloat | None = Field(
default=None,
default=60,
description=(
"The maximum amount of time (in seconds) to wait for a connection to the"
+ " SMTP server. If set to `None`, the operation will wait indefinitely."
Expand Down

0 comments on commit e8b1bae

Please sign in to comment.