diff --git a/xmrnodes/app.py b/xmrnodes/app.py index 1523cd1..46473e4 100644 --- a/xmrnodes/app.py +++ b/xmrnodes/app.py @@ -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) diff --git a/xmrnodes/models.py b/xmrnodes/models.py index 32fb6bd..842ab46 100644 --- a/xmrnodes/models.py +++ b/xmrnodes/models.py @@ -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()