mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-19 22:47:48 +00:00
provide context in docker startup logs (#13227)
* provide context in docker startup logs * reduce unnecessary docker logging * this is set in one place; can be less complicated
This commit is contained in:
1 parent
c54b279b50
commit
8f668657b3
2 files changed
+9
-22
No files matched your search
@@ -34,19 +34,8 @@ try:
|
||||
main_repo = Repo(pathlib.Path(__file__).parent.parent.parent.parent.parent)
|
||||
main_commit = main_repo[main_repo.head()]
|
||||
except NotGitRepository:
|
||||
output = logger.warning
|
||||
|
||||
try:
|
||||
from django.conf import settings
|
||||
|
||||
if settings.DOCKER:
|
||||
output = logger.info
|
||||
except Exception:
|
||||
# We may not have access to settings at this point
|
||||
pass
|
||||
|
||||
output(git_warning_txt)
|
||||
|
||||
if os.environ.get('INVENTREE_DOCKER', 'false') != 'true':
|
||||
logger.warning(git_warning_txt)
|
||||
main_repo = None
|
||||
main_commit = None
|
||||
|
||||
|
||||
Reference in new issue
Block a user