Commit Graph

23 Commits

Author SHA1 Message Date
dni ⚡
7a37e72915
[REFACTOR] replace async_wrap with run_sync (#1858)
* replace async_wrap with run_sync

formatting

remove unused fn

properly raise exception, not for timeout though

* [TEST] proper startup and shutdown (#1860)

* add proper startup / shutdown in tests

* fix event loop issues

because uvloop was installed in server.py which is not the main entry point when tests are ran.
this caused the loops referenced by the locks and queues to be a different one than the one used to run the tests
(only an issue in python 3.9)

* give openapi more time, does not matter anyway, regtest takes way longer

---------

Co-authored-by: jacksn <jkranawetter05@gmail.com>

remove uvloop

* fix test

* dont touch pyproject

* fix: install uvloop in conftest

not using uvloop at all causes tests to take way longer

---------

Co-authored-by: jacksn <jkranawetter05@gmail.com>
2023-08-28 10:59:56 +01:00
dni ⚡
4e6f229db2
[CHORE] string formatting default length 88 (#1887)
* [CHORE] string formatting default length 88

uses blacks default off 88 and enabled autostringformatting

* formatting

* nitpicks jackstar

fix
2023-08-24 10:26:09 +01:00
dni ⚡
f0a66e41fb
[CHORE] flake8 issues E402, E721 and F821 (#1874)
* F821: undefine name
disabled and logged webhook_listener for opennode and lnpay because they are obviously not working
* E402: module level import not at top of file
* E721 fixes, only popped up for python3.9 not 3.10
2023-08-16 12:22:14 +02:00
jackstar12
772ae2a1ab
support uvicorn reload functionality (#1841)
* support uvicorn reload functionality
see:
8239373ec6/uvicorn/main.py (L580-L582)
* add docs for --reload

---------

Co-authored-by: dni  <office@dnilabs.com>
2023-08-03 09:53:36 +02:00
dni ⚡
153e22fb54
remove extensions dir completly, create it on startup (#1778)
* remove extensions dir compleltly, and create it on server.py start

* also ignore symlinks
2023-07-18 13:46:50 +02:00
dni ⚡
45b199a8ef
create datadir on launch (#1674)
* create datadir on launch
* change makedirs to Path.mkdir
2023-05-09 10:04:27 +02:00
Vlad Stan
99e7bf5cd0 chore: code format 2022-12-09 14:09:16 +02:00
Vlad Stan
4cd2fe7ee1
Merge branch 'main' into FinalAdminUI 2022-12-09 14:06:47 +02:00
Black Coffee
20b06e4922 Corrected casing of LNbits (not LNBits) throughout repo 2022-11-30 14:14:31 +00:00
dni ⚡
aefea9b801 mypy and formatting 2022-11-24 14:53:11 +01:00
dni ⚡
74eece78de merge from master 2022-11-24 14:35:32 +01:00
dni ⚡
0096ce8ad1
let poetry run lnbits recognize forwarded_ips for https (#1109) 2022-11-19 14:41:37 -06:00
dni ⚡
1b675f295b add get settings endpoint with only values you can also save 2022-10-21 11:13:40 +02:00
dni ⚡
47c334de7a add loop to uvicorn 2022-10-21 10:00:47 +02:00
dni ⚡
c9ead25d50 bugfixes and fix topup wallet 2022-10-12 13:08:59 +02:00
dni ⚡
36f54ff0c3 formatting and conftest 2022-10-05 13:04:38 +02:00
dni ⚡
d2c216d6db fix regtests, admin settings prints 2022-10-05 13:04:38 +02:00
dni ⚡
92e52cd883 overall fixes 2022-10-05 13:04:38 +02:00
dni ⚡
1ffc8c3498 use new settings and remove unused amdin extension stuff 2022-10-05 13:04:36 +02:00
calle
9b27c2da01
argparser respect boolean arguments (#842) 2022-08-04 16:37:48 +02:00
calle
2edaa0ee03
Poetry: uvicorn with .env and command line arguments (#836)
* fixed poetry logs

* make isort happy

* Poetry: uvicorn .env and command line arguments

* restore commands.py

* format

* own it

Co-authored-by: dni <dni.khr@gmail.com>
2022-08-03 13:16:50 +02:00
Tiago Vasconcelos
41dc1b0512
Fix/hotfix tpos 2 (#783)
* fix older tpos without tips

* bad math requesting invoice

* make format
2022-07-27 16:45:17 +02:00
matthewcroughan
49bd5ad26b lnbits/server.py: init
This adds a wrapper around uvicorn using Python. This is so the
entrypoint lnbits.server can be called on the command line, and passed
arguments like port and host. This makes lnbits feel more like a real
CLI application, and lends well to running as a service in systemd
2022-07-08 11:06:23 +01:00