Fix string formatting in job logging

This commit is contained in:
2025-02-11 17:40:31 +01:00
parent 1dba51a40d
commit b6f64e6cd0

View File

@ -160,7 +160,7 @@ class RemindBotClient(discord.Client):
time: str = "Paused" time: str = "Paused"
if hasattr(job, "next_run_time") and job.next_run_time and isinstance(job.next_run_time, datetime.datetime): if hasattr(job, "next_run_time") and job.next_run_time and isinstance(job.next_run_time, datetime.datetime):
time = job.next_run_time.strftime("%Y-%m-%d %H:%M:%S") time = job.next_run_time.strftime("%Y-%m-%d %H:%M:%S")
logger.info(rf"\t{job.id}: {job.name} - {time} - {msg}") logger.info(f"\t{job.id}: {job.name} - {time} - {msg}")
except (AttributeError, LookupError): except (AttributeError, LookupError):
logger.exception("Failed to loop through jobs") logger.exception("Failed to loop through jobs")