Return the integer Unix epoch update timestamp of the specified bank and key.
(bank, key)
| 350 | |
| 351 | |
| 352 | def updated(bank, key): |
| 353 | """ |
| 354 | Return the integer Unix epoch update timestamp of the specified bank and |
| 355 | key. |
| 356 | """ |
| 357 | _init_client() |
| 358 | query = ( |
| 359 | "SELECT UNIX_TIMESTAMP(last_update) FROM {} WHERE bank=%s " |
| 360 | "AND etcd_key=%s".format(__context__["mysql_table_name"]) |
| 361 | ) |
| 362 | data = (bank, key) |
| 363 | cur, _ = run_query(__context__.get("mysql_client"), query=query, args=data) |
| 364 | r = cur.fetchone() |
| 365 | cur.close() |
| 366 | return int(r[0]) if r else r |
nothing calls this directly
no test coverage detected