Commit graph

8 commits

Author SHA1 Message Date
fusion44
f1aa2107fd refactor: code cleanup
- rename various keys
- update app status updater code to work like the app management code
- remove some unused code

refs #123
2025-05-06 09:16:46 +02:00
fusion44
1f491ed0a0 feat: implement (un)install celery task
refs #123
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
751687e60b chore: run ruff format and isort 2025-05-06 09:16:46 +02:00
fusion44
691d5da6b9 feat: update formatting of errors sent to clients
refs #123
2025-05-06 09:16:46 +02:00
fusion44
5c61c2f942
chore: remove unused import and run pre-commit 2022-12-01 19:14:01 +01:00
fusion44
ba453e7bdb
refactor: switch to domain driven directory layout 2022-10-03 20:22:00 +02:00
Renamed from app/models/api.py (Browse further)