persistent lws store

master
lza_menace 2 years ago
parent 8795d8c9eb
commit 9d7827b28a

2
.gitignore vendored

@ -1,5 +1,5 @@
monero-lws monero-lws
docker-monero-node docker-monero-node
.env .env
data
node_modules node_modules

@ -5,6 +5,8 @@ x-log-config: &log-config
options: options:
max-size: "50m" max-size: "50m"
max-file: "5" max-file: "5"
volumes:
lws:
services: services:
# lws-web: # lws-web:
# container_name: lws-web # container_name: lws-web
@ -41,6 +43,8 @@ services:
ports: ports:
- 127.0.0.1:8081:8081 - 127.0.0.1:8081:8081
- 127.0.0.1:8080:8080 - 127.0.0.1:8080:8080
volumes:
- lws:/home/monero-lws/.bitmonero/light_wallet_server
command: command:
--scan-threads 4 --rest-threads 4 --rest-server http://0.0.0.0:8080 --admin-rest-server http://0.0.0.0:8081 --log-level 1 --daemon=tcp://monerod:18082 --sub=tcp://monerod:18083 --confirm-external-bind --scan-threads 4 --rest-threads 4 --rest-server http://0.0.0.0:8080 --admin-rest-server http://0.0.0.0:8081 --log-level 1 --daemon=tcp://monerod:18082 --sub=tcp://monerod:18083 --confirm-external-bind
<<: *log-config <<: *log-config

@ -2,12 +2,11 @@ from datetime import datetime
import requests import requests
from peewee import * from peewee import *
from playhouse.sqliteq import SqliteQueueDatabase
from lws import config from lws import config
db = SqliteQueueDatabase('data/lws-web.db') db = SqliteDatabase('data/lws.db')
class User(Model): class User(Model):
@ -111,7 +110,7 @@ class Wallet(Model):
req = requests.post(endpoint, json=data, timeout=5) req = requests.post(endpoint, json=data, timeout=5)
req.raise_for_status() req.raise_for_status()
if req.ok: if req.ok:
print(r.content) print(req.content)
return True return True
return False return False
except Exception as e: except Exception as e:

Loading…
Cancel
Save