Conversation
User can set GRANIAN_LOG_LEVEL environment variable to override the default "critical" value.
Greptile OverviewGreptile SummaryChanged granian production backend to use environment variable Key changes:
Minor inconsistencies noted:
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: e01a62e |
| if "GRANIAN_LOG_LEVEL" not in os.environ: | ||
| extra_env["GRANIAN_LOG_LEVEL"] = "critical" |
There was a problem hiding this comment.
The function parameter loglevel on line 657 is not being used. The dev mode run_granian_backend (line 551) uses log_level=LogLevels(loglevel.value) and the uvicorn prod backend (line 644) uses *("--log-level", loglevel.value). Consider using the function parameter as the default instead of hardcoding "critical".
| if "GRANIAN_LOG_LEVEL" not in os.environ: | ||
| extra_env["GRANIAN_LOG_LEVEL"] = "critical" |
There was a problem hiding this comment.
Consider extracting "GRANIAN_LOG_LEVEL" and "critical" as named constants (same applies to "GRANIAN_WORKERS" on line 684).
Context Used: Rule from dashboard - String literals that are used as identifiers or keys should be extracted into named constants rather... (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
User can set
GRANIAN_LOG_LEVELenvironment variable to override the default "critical" value.