fix: typing fixes since moving to Mapped types in models
This commit is contained in:
parent
d08388c339
commit
4693e994ba
5 changed files with 71 additions and 44 deletions
|
@ -127,6 +127,8 @@ class BridgeMetaAutomation(BaseAutomation):
|
|||
).all()
|
||||
logging.debug("Found %s deprecated bridges", len(deprecated_bridges))
|
||||
for bridge in deprecated_bridges:
|
||||
if bridge.deprecated is None:
|
||||
continue # Possible due to SQLAlchemy lazy loading
|
||||
cutoff = datetime.datetime.utcnow() - datetime.timedelta(hours=bridge.conf.expiry_hours)
|
||||
if bridge.deprecated < cutoff:
|
||||
logging.debug("Destroying expired bridge")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue