Merge pull request from Guovin/dev

fix:app run
This commit is contained in:
Govin 2024-08-15 17:27:37 +08:00 committed by GitHub
commit 71bf26e70e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -201,10 +201,6 @@ def scheduled_task():
if __name__ == "__main__":
# Run scheduled_task
scheduled_task()
# If not run with 'scheduled_task' argument and not in GitHub Actions, start Flask server
if len(sys.argv) <= 1 or sys.argv[1] != "scheduled_task":
if not os.environ.get("GITHUB_ACTIONS"):
app.run(host="0.0.0.0", port=8000)
if not os.environ.get("GITHUB_ACTIONS"):
app.run(host="0.0.0.0", port=8000)