Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@motorina0
Copy link
Collaborator

@motorina0 motorina0 commented Apr 19, 2024

#2399

There should be no while True loops in the app.
Instead while settings.lnbits_runing: should be used.

On the shutdown signal do settings.lnbits_runing = False.

This change also helps while testing. Previous infinite loops can no be stoped.

@dni dni changed the title feat: add settings.lnbits_runing feat: add settings.lnbits_running Apr 19, 2024
@codecov
Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 68.75000% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 60.87%. Comparing base (e91096c) to head (95a5b2a).

Files Patch % Lines
lnbits/wallets/cliche.py 0.00% 2 Missing ⚠️
lnbits/core/tasks.py 66.66% 1 Missing ⚠️
lnbits/core/views/payment_api.py 0.00% 1 Missing ⚠️
lnbits/wallets/alby.py 0.00% 1 Missing ⚠️
lnbits/wallets/lnpay.py 0.00% 1 Missing ⚠️
lnbits/wallets/lntips.py 0.00% 1 Missing ⚠️
lnbits/wallets/opennode.py 0.00% 1 Missing ⚠️
lnbits/wallets/spark.py 0.00% 1 Missing ⚠️
lnbits/wallets/zbd.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2450      +/-   ##
==========================================
+ Coverage   60.85%   60.87%   +0.01%     
==========================================
  Files          65       65              
  Lines        9363     9395      +32     
==========================================
+ Hits         5698     5719      +21     
- Misses       3665     3676      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@motorina0
Copy link
Collaborator Author

@dni does it make sense to set this flag also when server_restart.set() is called (/api/v1/restart endpoint)?

@dni
Copy link
Member

dni commented Apr 20, 2024

@motorina0 i would set it in server.py

@motorina0 motorina0 merged commit 4ac3011 into dev Apr 22, 2024
@motorina0 motorina0 deleted the lnbits_running_setting branch April 22, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants