forked from mirrors/thatmattlove-hyperglass
various minor changes to make pylint STFU
This commit is contained in:
parent
eece919376
commit
9d5608d72e
3 changed files with 8 additions and 3 deletions
|
|
@ -16,6 +16,9 @@
|
|||
# I find this to be needlessly obtuse, and therefore log fstrings directly:
|
||||
# logger.error(f"Error: {var1}, {var2}, {var3}")
|
||||
# Perhaps this is "incorrect", but it works well and is more elegant, in my uneducated opinion.
|
||||
#
|
||||
# "duplicate-code" was disabled due to PyLint complaining about using the same logzero debug
|
||||
# configuration in two files. Apparently having a consistent logging configuration is "bad".
|
||||
|
||||
|
||||
[MASTER]
|
||||
|
|
@ -154,7 +157,8 @@ disable=print-statement,
|
|||
comprehension-escape,
|
||||
bad-continuation,
|
||||
cyclic-import,
|
||||
logging-fstring-interpolation
|
||||
logging-fstring-interpolation,
|
||||
duplicate-code
|
||||
|
||||
# Enable the message, report, category or checker with the given id(s). You can
|
||||
# either give multiple identifier separated by comma (,) or put this option
|
||||
|
|
|
|||
|
|
@ -66,5 +66,6 @@ def worker_exit(server, worker): # pylint: disable=unused-argument
|
|||
|
||||
|
||||
def on_exit(server):
|
||||
"""Pre-shutdown Gunicorn Tasks"""
|
||||
if os.path.exists(prometheus_multiproc_dir):
|
||||
shutil.rmtree(prometheus_multiproc_dir)
|
||||
|
|
|
|||
|
|
@ -127,10 +127,10 @@ def handle_500(e):
|
|||
|
||||
|
||||
def clear_cache():
|
||||
"""Function to clear the Flask-Caching cache"""
|
||||
"""Function to clear the Redis cache"""
|
||||
with app.app_context():
|
||||
try:
|
||||
cache.clear()
|
||||
r_cache.flushdb()
|
||||
except Exception as error_exception:
|
||||
logger.error(f"Error clearing cache: {error_exception}")
|
||||
raise
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue