Skip to content

Commit

Permalink
web: update submodule + format code
Browse files Browse the repository at this point in the history
ci:  restart app when submodule change
  • Loading branch information
hoang-rio committed Dec 10, 2024
1 parent 30f3d07 commit 61beccd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_with_git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
SSH_DEPLOY_COMMAND="cd ${{secrets.SSH_DEPLOY_PATH}} && git pull && git submodule update"
HAS_PYTHON_CHANGE=true
GIT_CHANGED_FILE=$(git show --name-only)
if [[ $(echo $GIT_CHANGED_FILE | grep "\.py") == "" && $(echo $GIT_CHANGED_FILE | grep "\.sh") == "" ]]; then
if [[ $(echo $GIT_CHANGED_FILE | grep "\.py") == "" && $(echo $GIT_CHANGED_FILE | grep "\.sh") == "" && $(echo $GIT_CHANGED_FILE | grep "aiohttp") == "" ]]; then
HAS_PYTHON_CHANGE=false
fi
Expand Down
3 changes: 3 additions & 0 deletions web_viewer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def dict_factory(cursor, row):
d[col[0]] = row[idx]
return d


def total(_: web.Request):
if "DB_NAME" not in config:
return web.json_response({}, headers=VITE_CORS_HEADER)
Expand Down Expand Up @@ -115,6 +116,7 @@ def daily_chart(_: web.Request):
res = web.json_response(daily_chart, headers=VITE_CORS_HEADER)
return res


def monthly_chart(_: web.Request):
if "DB_NAME" not in config:
return web.json_response([], headers=VITE_CORS_HEADER)
Expand All @@ -130,6 +132,7 @@ def monthly_chart(_: web.Request):
res = web.json_response(monthly_chart, headers=VITE_CORS_HEADER)
return res


def yearly_chart(_: web.Request):
if "DB_NAME" not in config:
return web.json_response([], headers=VITE_CORS_HEADER)
Expand Down

0 comments on commit 61beccd

Please sign in to comment.