Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/chronos/app_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def single_run(self) -> None:
self.close_calendars()
logger.debug("Closed sockets to calendars")
except Exception as ex:
logger.critical(f"Cron excecution failed. Reason {ex}")
show_trace = self.app_config.get("log", "show_tracebacks")
logger.critical(f"Cron excecution failed. Reason {ex}", exc_info=show_trace)

def close_calendars(self):
try:
Expand Down
3 changes: 2 additions & 1 deletion src/chronos/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class ConfigValue:
Set Types: frozenset
"""

def __init__(self, name, datatype=str, value=None, default=None):
def __init__(self, name, datatype: type = str, value=None, default=None):
if datatype not in (
str,
int,
Expand Down Expand Up @@ -281,6 +281,7 @@ def __init__(self):
ConfigValue("rotation", default="d"),
ConfigValue("interval", int, default=1),
ConfigValue("backups", int, default=7),
ConfigValue("show_tracebacks", bool, default=False),
)
# Section [debug]
self.debug = ConfigSection(
Expand Down