Add created_at and updated_at columns to ft_processing_time

This commit is contained in:
Rebecca Law
2021-02-23 14:24:46 +00:00
parent 21edf7bfdd
commit 0849070eca
4 changed files with 16 additions and 3 deletions

View File

@@ -1,3 +1,5 @@
from datetime import datetime
from sqlalchemy.dialects.postgresql import insert
from app import db
@@ -23,7 +25,8 @@ def insert_update_processing_time(processing_time):
index_elements=[table.c.bst_date],
set_={
'messages_total': stmt.excluded.messages_total,
'messages_within_10_secs': stmt.excluded.messages_within_10_secs
'messages_within_10_secs': stmt.excluded.messages_within_10_secs,
'updated_at': datetime.utcnow()
}
)
db.session.connection().execute(stmt)