20c/confu

time duration config for settings manager

Closed this issue · 0 comments

vegu commented

Right now duration settings are int (usually seconds)

It'd be nice to add a custom type that supports the format of "10h", "3600s" etc.

settings_manager.set_option("CACHE_EXPIRY", 3600)

would be same as

settings_manager.set_option("CACHE_EXPIRY", TimeDuration("1h"))

but the latter one would be more user friendly to override through env variables.