From ac679ae6bb9886ef950e0273871eb4a07a26ddab Mon Sep 17 00:00:00 2001 From: james Date: Wed, 25 Oct 2023 09:10:55 +0800 Subject: [PATCH] Readd ExecStart back --- backend/api_app/controllers/apps.py | 1 - backend/dbcon/queries.py | 2 +- scripts/app-store-frontend.service | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/api_app/controllers/apps.py b/backend/api_app/controllers/apps.py index 465cfc6..0f978c8 100644 --- a/backend/api_app/controllers/apps.py +++ b/backend/api_app/controllers/apps.py @@ -26,7 +26,6 @@ def get_string_date_from_days_ago(days: int) -> str: def get_app_overview_dict(collection: str) -> Collection: category_limit = 20 - df = query_recent_apps(collection=collection, limit=category_limit) categories_dicts = [] groups = df.groupby(["mapped_category"]) diff --git a/backend/dbcon/queries.py b/backend/dbcon/queries.py index dbe7975..c36e875 100644 --- a/backend/dbcon/queries.py +++ b/backend/dbcon/queries.py @@ -52,7 +52,7 @@ def query_recent_apps(collection: str, limit=20): ORDER BY rating_count DESC NULLS LAST ); """ - sel_query = f"""WITH NumberedRows AS ( + sel_query = f"""WITH NumberedRows AS ( SELECT {my_cols}, ROW_NUMBER() OVER (PARTITION BY store, mapped_category diff --git a/scripts/app-store-frontend.service b/scripts/app-store-frontend.service index 9d376a0..dde36c4 100644 --- a/scripts/app-store-frontend.service +++ b/scripts/app-store-frontend.service @@ -10,6 +10,7 @@ User=ubuntu Group=ubuntu SupplementaryGroups=www-data Environment=NODE_ENV=production SOCKET_PATH=/tmp/app-store-frontend.sock +ExecStart=/usr/local/bin/node /home/ubuntu/app-store-dash/frontend/build ExecStartPost=/bin/bash -c "sleep 5 && sudo chown www-data:www-data /tmp/app-store-frontend.sock" Restart=on-failure KillMode=mixed