sagmansercan commented on a change in pull request #22389:
URL: https://github.com/apache/airflow/pull/22389#discussion_r836385110
##########
File path: airflow/configuration.py
##########
@@ -608,6 +609,48 @@ def getjson(self, section, key, fallback=_UNSET, **kwargs)
-> Union[dict, list,
except JSONDecodeError as e:
raise AirflowConfigException(f'Unable to parse [{section}] {key!r}
as valid json') from e
+ def gettimedelta(self, section, key, fallback=None, **kwargs) ->
Optional[datetime.timedelta]:
Review comment:
hi, this method aims to provide a simple functionality to take a string
value from the config file, then try to convert it into an integer, and pass it
into timedelta in seconds. So, it is expected to be returned as _a single
timedelta object_. It is very similar to the other helper methods like
_getint_, _getfloat_, _getboolean_, etc. So I think the method does not support
the operation for multiple `t`s.
If I misunderstood your comment, I would like to hear more on this to
understand the use cases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]