Proper dynamic config reload

A bunch of options can now be changed without a restart as the config is
now guaranteed to be reloaded on change through the use of a RELOADCONFIG environment variable.
This commit is contained in:
2020-07-12 19:53:04 +01:00
parent 27169e4e0d
commit d615b21c7d
15 changed files with 148 additions and 115 deletions

View File

@@ -1,3 +1,4 @@
# Handles everything related to emails
import datetime
import pytz
import requests
@@ -43,9 +44,7 @@ class Email:
if expires_in["hours"] == 0:
expires_in = f'{str(expires_in["minutes"])}m'
else:
expires_in = (
f'{str(expires_in["hours"])}h ' + f'{str(expires_in["minutes"])}m'
)
expires_in = f'{str(expires_in["hours"])}h {str(expires_in["minutes"])}m'
log.debug(f"{self.address}: Expires in {expires_in}")
return {"date": date, "time": time, "expires_in": expires_in}