fixes timestamp

This commit is contained in:
ben 2023-01-05 21:39:33 +00:00
parent d838f63454
commit d8af0da440
2 changed files with 4 additions and 4 deletions

View file

@ -117,19 +117,19 @@ async def get_mempool_info(endPoint: str, gerty) -> dict:
mempool_id,
json.dumps(response.json()),
endPoint,
db.timestamp_now,
time.time(),
gerty.mempool_endpoint,
),
)
return response.json()
if int(time.time()) - row.time > 20:
if int(time.time()) - int(row.time) > 20:
async with httpx.AsyncClient() as client:
response = await client.get(gerty.mempool_endpoint + url)
await db.execute(
"UPDATE gerty.mempool SET data = ?, time = ? WHERE endpoint = ? AND mempool_endpoint = ?",
(
json.dumps(response.json()),
db.timestamp_now,
time.time(),
endPoint,
gerty.mempool_endpoint,
),

View file

@ -6,7 +6,7 @@ gertyname }}{% endraw %}{% endblock %}{% block page %} {% raw %}
v-if="fun_exchange_market_rate || fun_satoshi_quotes"
>
<q-card
v-if="fun_exchange_market_rate"
v-if="fun_exchange_market_rate[0]"
unelevated
class="q-pa-sm"
style="background: none !important"