Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ServiceBus] Fix TTL on messages (#21869)
Using `seconds` on `timedelta` to set TTL leads to unexpected behaviour with, for example, `timedelta(days=1)`: ``` azure.servicebus.exceptions.ServiceBusError: Argument TimeToLIve must be a positive timeout value. The provided value was 00:00:00. Parameter name: TimeToLIve Actual value was 00:00:00 ``` Instead of `seconds`, `total_seconds()` should be used: ``` >>> timedelta(days=1).seconds 0 >>> timedelta(days=1).total_seconds() 86400.0 ```
- Loading branch information