Add last poll tracking to Lamassu configuration: update database schema to include last_poll_time and last_successful_poll fields, modify CRUD operations to record poll times, and enhance transaction processing to utilize these timestamps for improved polling accuracy.
This commit is contained in:
parent
3c6262b309
commit
a107f825af
7 changed files with 129 additions and 20 deletions
|
|
@ -158,3 +158,21 @@ async def m007_add_ssh_tunnel_support(db):
|
|||
ADD COLUMN ssh_private_key TEXT;
|
||||
"""
|
||||
)
|
||||
|
||||
|
||||
async def m008_add_last_poll_tracking(db):
|
||||
"""
|
||||
Add last poll time tracking to Lamassu configuration table.
|
||||
"""
|
||||
await db.execute(
|
||||
"""
|
||||
ALTER TABLE myextension.lamassu_config
|
||||
ADD COLUMN last_poll_time TIMESTAMP;
|
||||
"""
|
||||
)
|
||||
await db.execute(
|
||||
"""
|
||||
ALTER TABLE myextension.lamassu_config
|
||||
ADD COLUMN last_successful_poll TIMESTAMP;
|
||||
"""
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue