mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
rename run_app to create_app
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
# TODO
|
||||
A list of things to do. Feel free to grab one of this and work on it.
|
||||
|
||||
## Clean up old playlist images
|
||||
When playlists are deleted or their images updated, the old
|
||||
images are not deleted.
|
||||
|
||||
Write a function to:
|
||||
- read all images in the playlist image directory and checks unlinked images by comparing the list with the .image property of each property
|
||||
- delete unlinked images
|
||||
|
||||
The function can run on app start up, before periodic checks
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
from locust import HttpUser, task
|
||||
|
||||
|
||||
class HelloWorldUser(HttpUser):
|
||||
host = "http://localhost:1980"
|
||||
|
||||
# @task
|
||||
# def get_all_artists(self):
|
||||
# self.client.get(
|
||||
# "/getall/artists?start=0&limit=50&sortby=created_date&reverse=1"
|
||||
# )
|
||||
|
||||
@task
|
||||
def get_album_info(self):
|
||||
self.client.get("/artist/9e6781427eab4934")
|
||||
@@ -6,7 +6,7 @@ import multiprocessing
|
||||
from app.arg_handler import handle_build, handle_password_reset
|
||||
from app.utils.filesystem import get_home_res_path
|
||||
from app.utils.xdg_utils import get_xdg_config_dir
|
||||
from manage import run_app
|
||||
from manage import create_app
|
||||
|
||||
|
||||
def version(*args, **kwargs):
|
||||
@@ -71,7 +71,7 @@ def run(*args, **kwargs):
|
||||
os.environ["SWINGMUSIC_XDG_CONFIG_DIR"] = str(
|
||||
pathlib.Path(kwargs["config"]).resolve()
|
||||
)
|
||||
run_app(kwargs["host"], kwargs["port"], kwargs["config"])
|
||||
create_app(kwargs["host"], kwargs["port"], kwargs["config"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -29,7 +29,7 @@ from app.utils.filesystem import get_home_res_path
|
||||
from app.utils.paths import getClientFilesExtensions
|
||||
|
||||
|
||||
def run_app(host: str, port: int, config: Path):
|
||||
def create_app(host: str, port: int, config: Path):
|
||||
# settings.Paths.set_config_dir(config)
|
||||
|
||||
# Load mimetypes for the web client's static files
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"age": 45,
|
||||
"name": "Johniee"
|
||||
}
|
||||
Generated
-2778
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user