-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Description
Good morning,
with the recent upgrade to the monitoring dashboard to version 5.0 the datetime support has been updated, this has, however, broken my previous installation (using PostreSQL as backend) due to the way in which SQLAlchemy ORM works.
In the __init__.py within flask_monitoringdashboard.database the timestamps are defined in this way (let's take for example Request)
time_requested = Column(DateTime, default=datetime.datetime.now(datetime.timezone.utc))
"""Moment when the request was handled."""
the default timestamp however is evaluated once, when the module is loaded, so the timestamps stays frozen.
The solution would then be to update the functions that perform insert operations to explicitely calculate the current time every time that they are called.
Thank you for your help in this matter.
Metadata
Metadata
Assignees
Labels
No labels