Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

__init__/fix: the app will shutdown if wsgi fail. #2193

Closed

Conversation

Constantin1489
Copy link
Contributor

@Constantin1489 Constantin1489 commented Feb 15, 2024

this looks weird but refer to another apps's docker-compse, they start the DB first(https://github.com/Leantime/docker-leantime/blob/c35f5a72670d59efa7b2c0e88fca19ff4c11d8ae/docker-compose.yml#L30, https://github.com/minhng92/odoo-16-docker-compose/blob/c28f67b805413b7ebe7c8c4a91c1db38b67e2f83/docker-compose.yml#L18) and then the app.

Because the CD is standalone, the DB part started before the wsgi... So... then port conflict happens we need to stop the threads..

closes #2177

# port conflicts and shutdown.
PORT=5000 python changedetection.py -d /datastore' || true &
sleep 7
docker ps -a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sleep is a little longer. the reason will be appeared in docker ps -a

This comment was marked as outdated.

app.config.exit.set()
datastore.stop_thread = True
while len(threading.enumerate()) > 1:
time.sleep(1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#app.config.exit.set()
#datastore.stop_thread = True
while len(threading.enumerate()) > 1:
    print(threading.enumerate())

shows the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[bug/feature] when something else is already on the socket at startup, the app will continue silently..
1 participant