mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add better logging on tz failures
This commit is contained in:
parent
12fc3be00d
commit
6fa1b02888
@ -134,9 +134,10 @@ class ServerInstance:
|
||||
self.last_backup_failed = False
|
||||
try:
|
||||
self.tz = get_localzone()
|
||||
except ZoneInfoNotFoundError:
|
||||
except ZoneInfoNotFoundError as e:
|
||||
logger.error(
|
||||
"Could not capture time zone from system. Falling back to Europe/London"
|
||||
f" error: {e}"
|
||||
)
|
||||
self.tz = ZoneInfo("Europe/London")
|
||||
self.server_scheduler = BackgroundScheduler(timezone=str(self.tz))
|
||||
|
@ -47,9 +47,10 @@ class TasksManager:
|
||||
self.tornado: Webserver = Webserver(helper, controller, self)
|
||||
try:
|
||||
self.tz = get_localzone()
|
||||
except ZoneInfoNotFoundError:
|
||||
except ZoneInfoNotFoundError as e:
|
||||
logger.error(
|
||||
"Could not capture time zone from system. Falling back to Europe/London"
|
||||
f" error: {e}"
|
||||
)
|
||||
self.tz = "Europe/London"
|
||||
self.scheduler = BackgroundScheduler(timezone=str(self.tz))
|
||||
|
Loading…
Reference in New Issue
Block a user