Commit Graph

11 Commits

Author SHA1 Message Date
Matthias Mair
71c416bafd
Add flake8-logging linting (#5620)
* added flake8-logging to make logging more robust

* fixed LOG005 warnings

* fixed LOG008 warnings

* fixed LOG011 warnings

* fixed more LOG011 errors

* added ignores for intentional logger.error calls

* fixed even more LOG011 errors
2023-09-28 14:53:22 +10:00
Lukas
073a275d89
Skip ready functions if not in main thread or plugins are not loaded yet (#5005)
* Skip ready functions if not in main thread or plugins are not loaded yet

* Debug integration tests

* Update ready.py

* Update ready.py

* Fix isInMainThread and isPluginRegistryLoaded ready functions

* Preload gunicorn app to only invoke the appconfig ready functions once

* debug: test prints for statistics

* Remove debug print

* Test without

* Revert "Test without"

This reverts commit 1bc1872893.

* Second test

* Add checks back to part, label, user model

* Add checks back to inventree, plugin apps

* log server output for debugging

* hopefully I can get the log this time+

* Next test

* Test with --noreload

* Next test

* trigger: ci, because session expired

* block the second ready execution instead of the first

* fix: load order

* Fix test and revert gh actions workflow change

* Added all_apps method to reload machanism

* Changed detect reload mechanism

* Also trigger ready on reload

* Add skipping second reload back for testing mode

* Added doc string back

* Update InvenTree/plugin/base/integration/AppMixin.py
2023-07-26 08:33:13 +10:00
Matthias Mair
c6df0dbb2d
[BUG] Increase worker-timeout to account for install times (#4285)
Fixes #4284
2023-02-01 10:25:10 +11:00
Oliver
ee2290da28
Gunicorn options (#4192)
* Add option for controlling gunicorn timeout

* Adds gunicorn timeout as docker env variable
2023-01-10 07:53:57 +11:00
Oliver
53ecca34d8
gunicorn: revert support for gevent (#4035)
- For some reason this causes production docker image to fail to build
- but only in GitHub CI ??
2022-12-09 16:51:58 +11:00
Oliver
6b659ba22f
Improvements for docker / gunicorn (#4031)
* Additional options for gunicorn configuration file (in docker):

Ref: https://pythonspeed.com/articles/gunicorn-in-docker/

* Catch potential error on startup

* Tweak log message for docker

* Wrap news feed update in try block
2022-12-08 23:06:02 +11:00
Matthias Mair
f38386b13c
Add more checks to pre-commit (#3132)
* Add bandit to pre-commit checks

* fix catchall exceptions

* remove unused definitons

* remove unuseed ariables

* Add docstring

* fix B006, B008 errors

* fix B007 error

* ignore B009

* Add checks for formatting and naming
2022-06-06 08:56:52 +10:00
Matthias Mair
e1d22f538d resort imports 2022-05-20 17:24:51 +02:00
Oliver Walters
d9f4c34a42 logging.get -> logging.getLogger 2021-07-29 23:44:52 +10:00
Oliver
dd12a593f4 Specify how many workers to use 2021-07-29 16:37:34 +10:00
Oliver Walters
270c0ea85d Cleanup docker files 2021-04-18 15:24:33 +10:00