Skip to content

__init__.py: Fix config startup check#811

Merged
ix5 merged 2 commits intoisso-comments:masterfrom
fliiiix:bugfix/startup-errors
Mar 20, 2022
Merged

__init__.py: Fix config startup check#811
ix5 merged 2 commits intoisso-comments:masterfrom
fliiiix:bugfix/startup-errors

Conversation

@fliiiix
Copy link
Copy Markdown
Contributor

@fliiiix fliiiix commented Mar 6, 2022

gunicorn is not using main() it uses make_app via run.py.
Because of that we should check for the config file inside
make_app.
This is probably also true for other deployment options.

@fliiiix fliiiix force-pushed the bugfix/startup-errors branch from be821b4 to 44535e1 Compare March 6, 2022 20:05
@fliiiix
Copy link
Copy Markdown
Contributor Author

fliiiix commented Mar 6, 2022

I hope there is a better solution than this

@ix5 ix5 added bug server (Python) server code labels Mar 6, 2022
@ix5 ix5 added this to the 0.13 milestone Mar 6, 2022
@ix5
Copy link
Copy Markdown
Member

ix5 commented Mar 15, 2022

Hmm, I have not run into any issues with gunicorn and Isso yet. Can you provide a config that provokes the issue you're running into?

Please note that from a first glance, your change looks very sensible.

@fliiiix
Copy link
Copy Markdown
Contributor Author

fliiiix commented Mar 16, 2022

Good point i will add a way to reproduces this issue. I ran into that when testing the last pre-release.

@fliiiix
Copy link
Copy Markdown
Contributor Author

fliiiix commented Mar 17, 2022

Here is the example:

on master branch

$ gunicorn -b localhost:8080 -w 4 --preload isso.run             
2022-03-17 20:20:28,908 WARNING: unable to connect to your website, Isso will probably not work correctly. Please make sure, Isso can reach your website via HTTP(S).
[2022-03-17 20:20:28 +0100] [800014] [INFO] Starting gunicorn 20.1.0
[2022-03-17 20:20:28 +0100] [800014] [INFO] Listening at: http://127.0.0.1:8080 (800014)
[2022-03-17 20:20:28 +0100] [800014] [INFO] Using worker: sync
[2022-03-17 20:20:28 +0100] [800015] [INFO] Booting worker with pid: 800015
[2022-03-17 20:20:28 +0100] [800018] [INFO] Booting worker with pid: 800018
[2022-03-17 20:20:29 +0100] [800019] [INFO] Booting worker with pid: 800019
[2022-03-17 20:20:29 +0100] [800020] [INFO] Booting worker with pid: 800020

on this branch

gunicorn -b localhost:8080 -w 4 --preload isso.run
2022-03-17 20:21:22,747 ERROR: No website(s) configured, Isso won't work.

fliiiix added 2 commits March 20, 2022 21:14
gunicorn is not using main() it uses make_app via run.py.
Because of that we should check for the config file inside
make_app.
This is probably also true for other deployment options.
@ix5
Copy link
Copy Markdown
Member

ix5 commented Mar 20, 2022

Looks like a sensible change. Thanks!

@ix5 ix5 force-pushed the bugfix/startup-errors branch from 44535e1 to c57ee6e Compare March 20, 2022 20:21
@ix5 ix5 merged commit 6364eb9 into isso-comments:master Mar 20, 2022
@fliiiix fliiiix deleted the bugfix/startup-errors branch March 21, 2022 06:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug server (Python) server code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants