mirror of
https://github.com/lalanza808/monero.fail.git
synced 2025-04-18 18:15:48 -04:00
make async db calls
This commit is contained in:
parent
cd1e587ee1
commit
3d565f3c8d
@ -314,7 +314,7 @@ def validate():
|
||||
@app.cli.command("export")
|
||||
def export():
|
||||
all_nodes = []
|
||||
ts = int(arrow.get().timestamp())
|
||||
ts = int(arrow.get().timestamp)
|
||||
export_dir = f"{config.DATA_DIR}/export.txt"
|
||||
export_dir_stamped = f"{config.DATA_DIR}/export-{ts}.txt"
|
||||
nodes = Node.select().where(Node.validated == True)
|
||||
|
@ -2,11 +2,12 @@ from urllib.parse import urlparse
|
||||
from datetime import datetime
|
||||
|
||||
from peewee import *
|
||||
from playhouse.sqliteq import SqliteQueueDatabase
|
||||
|
||||
from xmrnodes import config
|
||||
|
||||
|
||||
db = SqliteDatabase(f"{config.DATA_DIR}/sqlite.db")
|
||||
db = SqliteQueueDatabase(f"{config.DATA_DIR}/sqlite.db")
|
||||
|
||||
class Node(Model):
|
||||
id = AutoField()
|
||||
|
Loading…
x
Reference in New Issue
Block a user