forked from metabrainz/listenbrainz-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix app init in case timescale listenstore is down
SQLALCHEMY_TIMESCALE_URI can be empty if listenstore_up is set to false in consul config. In such cases, we want to bring up the flask app with whatever parts possible so that submit listens endpoint keeps working. Currently, this breaks during flask admin init and leads to app creation errors. Add timescale uri to sqlalchemy binds only if listenstore is available and only register playlist admin views under the same condition.
- Loading branch information
Showing
2 changed files
with
34 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters