Commit graph

22 commits

Author SHA1 Message Date
fusion44
63b136d5ca
fix(apps): report electrs installed/configured/online in advanced status
_do_electrs_status_advanced only handled the negative cases: each guard
set installed/configured/status to its false-y value and returned early.
On the happy path (electrs installed, configured and running) it fell
through, populated the ports and sync details, but never set
s.installed/s.configured/s.status - so they kept their AppStatus
defaults (False/False/offline).

The /apps/status_advanced/electrs endpoint therefore reported electrs as
not installed and offline while simultaneously returning its ports and
sync details, disagreeing with the app_state_update_message status
(fusion44/blitz_api#286). Set the positive values when each guard passes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-08 13:07:52 +02:00
fusion44
9912ff0bfa
fix(apps): honour keep_data on uninstall and fix install log name
- uninstall_app dropped input.keep_data; _manage_app always ran the
  bonus script with a bare 'off', so the RaspiBlitz script fell back to
  an interactive whiptail prompt that hangs the non-interactive API.
  Thread keep_data through and pass the explicit
  --keep-data/--delete-data flag the scripts expect.
- install.{app_id}.log rendered as install.AppId.MEMPOOL.log because
  str-enum formatting includes the class name on Python 3.11+; use
  app_id.value here and in the CLN-incompatibility message.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 20:58:35 +02:00
fusion44
b555466053
fix: increase timeout for fetching app statuses 2025-08-08 18:27:48 +02:00
fusion44
1f491ed0a0 feat: implement (un)install celery task
refs #123
2025-05-06 09:16:46 +02:00
fusion44
824fa62c4d chore: small fixes and updates
- formatting
- small fix in a bitcoind model
- update the fake blitz scripts
- remove some dead code (app status sub)
2025-05-06 09:16:46 +02:00
fusion44
4e038e8fc7 feat: fetch app status via a celery task
This is a feature that allows to fetch the app status via a celery
task which stores the result in the Redis database and notifies the API
of the change. The API sends a notification to connected clients via the
SSE mechanism.

Using a background task allows to avoid crashing the whole API if the
script call fails.

The by default the cache is refreshed every 30 minutes. This can be
changed by setting the `BAPI_APP_STATUS_UPDATE_INTERVAL_MIN` environment
variable.

refs #123
2025-05-06 09:16:46 +02:00
fusion44
2b98912796 feat: replace call_script func with better func
use exec_bash_command instead

refs #123
2025-05-06 09:16:46 +02:00
fusion44
8ee5a49892 feat: update get app status error handling code
refs #123
2025-05-06 09:16:46 +02:00
fusion44
25e4be8441 feat: make config loading more flexible
If the environment variable BAPI_ENV_PATH is set, the config system will
try to read configs from the given path instead of .env in pwd

If no file is found .env in pwd will be used as a fallback

Env variables will always override settings in .env files.
2025-03-23 17:43:39 +01:00
fusion44
1127b60904
fix: only install AlbyHub when running a LND node 2024-12-18 14:04:54 +01:00
fusion44
81608cde0b
feat: add albyhub as a usable app 2024-12-17 09:33:02 +01:00
fusion44
c72f78a0be
fix: adapt to latest electrs script updates
refs #246
2024-02-25 19:03:04 +01:00
fusion44
00e56ba155
feat(#237): implement app_status_advanced endpoint (#238)
Some apps might give status information that is computationally to
expensive to include in the normal status endpoint which can be polled
more often.

closes #237
2024-02-18 12:10:35 +01:00
fusion44
adf472ac8b feat: implement Ruff as a linter; fix given errors 2023-06-25 07:17:00 +02:00
Christoph Stenglein
82546273c1
fix: send missing app install messages on install / uninstall (#208)
fix: send missing app install messages on install / uninstall
2023-05-20 11:44:09 +02:00
pre-commit-ci[bot]
3d1dfd919c
[pre-commit.ci] pre-commit autoupdate (#187)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-11 13:47:34 +01:00
fusion44
aff77c8d77
fix: send new app status message after uninstall
refs #184
2023-02-05 18:51:18 +01:00
Christoph Stenglein
3a2015b959
rename joinmarket-webui to jam in apps (#178) 2022-12-18 17:51:53 +01:00
Christoph Stenglein
4921bbeea1
add joinmarket-webui to available apps (#177)
* add joinmarket-webui to available apps

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-12-18 16:05:00 +01:00
/rootzoll
45207b3ca6
loop thru versions of apps (#174)
* loop thru versions of apps

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-12-18 10:21:18 +01:00
fusion44
4908f99999
fix: import problems and typos 2022-10-04 19:23:09 +02:00
fusion44
ba453e7bdb
refactor: switch to domain driven directory layout 2022-10-03 20:22:00 +02:00
Renamed from app/repositories/apps_impl/raspiblitz.py (Browse further)